diff --git a/stage0/src/Lean/Data/Lsp/Capabilities.lean b/stage0/src/Lean/Data/Lsp/Capabilities.lean index c5e61e5707..85d39c63aa 100644 --- a/stage0/src/Lean/Data/Lsp/Capabilities.lean +++ b/stage0/src/Lean/Data/Lsp/Capabilities.lean @@ -31,6 +31,9 @@ structure ServerCapabilities where textDocumentSync? : Option TextDocumentSyncOptions := none hoverProvider : Bool := false documentSymbolProvider : Bool := false + definitionProvider : Bool := false + declarationProvider : Bool := false + typeDefinitionProvider : Bool := false deriving ToJson, FromJson end Lsp diff --git a/stage0/src/Lean/Data/Lsp/LanguageFeatures.lean b/stage0/src/Lean/Data/Lsp/LanguageFeatures.lean index f47f9cce7d..9705471adb 100644 --- a/stage0/src/Lean/Data/Lsp/LanguageFeatures.lean +++ b/stage0/src/Lean/Data/Lsp/LanguageFeatures.lean @@ -28,6 +28,32 @@ instance : FromJson HoverParams := ⟨fun j => do instance : ToJson HoverParams := ⟨fun o => toJson o.toTextDocumentPositionParams⟩ +structure DeclarationParams extends TextDocumentPositionParams + +instance : FromJson DeclarationParams := ⟨fun j => do + let tdpp ← @fromJson? TextDocumentPositionParams _ j + pure ⟨tdpp⟩⟩ + +instance : ToJson DeclarationParams := + ⟨fun o => toJson o.toTextDocumentPositionParams⟩ + +structure DefinitionParams extends TextDocumentPositionParams + +instance : FromJson DefinitionParams := ⟨fun j => do + let tdpp ← @fromJson? TextDocumentPositionParams _ j + pure ⟨tdpp⟩⟩ + +instance : ToJson DefinitionParams := + ⟨fun o => toJson o.toTextDocumentPositionParams⟩ + +structure TypeDefinitionParams extends TextDocumentPositionParams + +instance : FromJson TypeDefinitionParams := ⟨fun j => do + let tdpp ← @fromJson? TextDocumentPositionParams _ j + pure ⟨tdpp⟩⟩ + +instance : ToJson TypeDefinitionParams := + ⟨fun o => toJson o.toTextDocumentPositionParams⟩ structure DocumentSymbolParams where textDocument : TextDocumentIdentifier diff --git a/stage0/src/Lean/DeclarationRange.lean b/stage0/src/Lean/DeclarationRange.lean index 81078f8955..4d8e4e5e4c 100644 --- a/stage0/src/Lean/DeclarationRange.lean +++ b/stage0/src/Lean/DeclarationRange.lean @@ -9,8 +9,15 @@ import Lean.AuxRecursor namespace Lean structure DeclarationRange where - pos : Position - endPos : Position + pos : Position + /-- A precomputed UTF-16 `character` field as in `Lean.Lsp.Position`. We need to store this + because LSP clients want us to report the range in terms of UTF-16, but converting a Unicode + codepoint stored in `Lean.Position` to UTF-16 requires loading and mapping the target source + file, which is IO-heavy. -/ + charUtf16 : Nat + endPos : Position + /-- See `charUtf16`. -/ + endCharUtf16 : Nat deriving Inhabited, DecidableEq, Repr structure DeclarationRanges where diff --git a/stage0/src/Lean/Elab/DeclarationRange.lean b/stage0/src/Lean/Elab/DeclarationRange.lean index 2786371f42..8b6d33c772 100644 --- a/stage0/src/Lean/Elab/DeclarationRange.lean +++ b/stage0/src/Lean/Elab/DeclarationRange.lean @@ -5,14 +5,21 @@ Authors: Leonardo de Moura -/ import Lean.DeclarationRange import Lean.Elab.Log +import Lean.Data.Lsp.Utf16 namespace Lean.Elab def getDeclarationRange [Monad m] [MonadFileMap m] (stx : Syntax) : m DeclarationRange := do - let pos := stx.getPos.getD 0 - let endPos := stx.getTailPos.getD pos let fileMap ← getFileMap - return { pos := fileMap.toPosition pos, endPos := fileMap.toPosition endPos } + let pos := stx.getPos.getD 0 + let endPos := stx.getTailPos.getD pos |> fileMap.toPosition + let pos := pos |> fileMap.toPosition + return { + pos := pos + charUtf16 := fileMap.leanPosToLspPos pos |>.character + endPos := endPos + endCharUtf16 := fileMap.leanPosToLspPos endPos |>.character + } /-- For most builtin declarations, the selection range is just its name, which is stored in the second position. diff --git a/stage0/src/Lean/Server/FileSource.lean b/stage0/src/Lean/Server/FileSource.lean index 158103c541..8d6a152636 100644 --- a/stage0/src/Lean/Server/FileSource.lean +++ b/stage0/src/Lean/Server/FileSource.lean @@ -43,6 +43,15 @@ instance DidCloseTextDocumentParams.hasFileSource : FileSource DidCloseTextDocum instance HoverParams.hasFileSource : FileSource HoverParams := ⟨fun h => fileSource h.toTextDocumentPositionParams⟩ +instance DeclarationParams.hasFileSource : FileSource DeclarationParams := + ⟨fun h => fileSource h.toTextDocumentPositionParams⟩ + +instance DefinitionParams.hasFileSource : FileSource DefinitionParams := + ⟨fun h => fileSource h.toTextDocumentPositionParams⟩ + +instance TypeDefinitionParams.hasFileSource : FileSource TypeDefinitionParams := + ⟨fun h => fileSource h.toTextDocumentPositionParams⟩ + instance WaitForDiagnosticsParam.hasFileSource : FileSource WaitForDiagnosticsParam := ⟨fun p => p.uri⟩ diff --git a/stage0/src/Lean/Server/FileWorker.lean b/stage0/src/Lean/Server/FileWorker.lean index 498b9fe6e1..15353bcaa8 100644 --- a/stage0/src/Lean/Server/FileWorker.lean +++ b/stage0/src/Lean/Server/FileWorker.lean @@ -9,6 +9,7 @@ import Std.Data.RBMap import Lean.Environment import Lean.PrettyPrinter +import Lean.DeclarationRange import Lean.Data.Lsp import Lean.Data.Json.FromToJson @@ -46,6 +47,8 @@ open Lsp open IO open Snapshots open Lean.Parser.Command +open Std (RBMap RBMap.empty) +open JsonRpc section Utils private def logSnapContent (s : Snapshot) (text : FileMap) : IO Unit := @@ -88,36 +91,18 @@ section Utils deriving Inhabited end Utils -open IO -open Std (RBMap RBMap.empty) -open JsonRpc - -section ServerM - -- Pending requests are tracked so they can be cancelled - abbrev PendingRequestMap := RBMap RequestID (Task (Except IO.Error Unit)) (fun a b => Decidable.decide (a < b)) - - structure ServerContext where - hIn : FS.Stream - hOut : FS.Stream - hLog : FS.Stream - docRef : IO.Ref EditableDocument - pendingRequestsRef : IO.Ref PendingRequestMap - - abbrev ServerM := ReaderT ServerContext IO - - def updatePendingRequests (map : PendingRequestMap → PendingRequestMap) : ServerM Unit := do - (←read).pendingRequestsRef.modify map - - /-- Elaborates the next command after `parentSnap` and emits diagnostics. -/ - private def nextCmdSnap (m : DocumentMeta) (parentSnap : Snapshot) (cancelTk : CancelToken) : ExceptT ElabTaskError ServerM Snapshot := do +/- Asynchronous snapshot elaboration. -/ +section Elab + /-- Elaborates the next command after `parentSnap` and emits diagnostics into `hOut`. -/ + private def nextCmdSnap (m : DocumentMeta) (parentSnap : Snapshot) (cancelTk : CancelToken) (hOut : FS.Stream) + : ExceptT ElabTaskError IO Snapshot := do cancelTk.check - let st ← read let maybeSnap ← compileNextCmd m.text.source parentSnap -- TODO(MH): check for interrupt with increased precision cancelTk.check let sendDiagnostics (msgLog : MessageLog) : IO Unit := do let diagnostics ← msgLog.msgs.mapM (msgToDiagnostic m.text) - st.hOut.writeLspNotification { + hOut.writeLspNotification { method := "textDocument/publishDiagnostics" param := { uri := m.uri @@ -148,12 +133,31 @@ section ServerM sendDiagnostics msgLog throw ElabTaskError.eof - /-- Elaborates all commands after `initSnap`, emitting the diagnostics. -/ - def unfoldCmdSnaps (m : DocumentMeta) (initSnap : Snapshot) (cancelTk : CancelToken) : ServerM (AsyncList ElabTaskError Snapshot) := do - AsyncList.unfoldAsync (nextCmdSnap m . cancelTk (←read)) initSnap + /-- Elaborates all commands after `initSnap`, emitting the diagnostics into `hOut`. -/ + def unfoldCmdSnaps (m : DocumentMeta) (initSnap : Snapshot) (cancelTk : CancelToken) (hOut : FS.Stream) + : IO (AsyncList ElabTaskError Snapshot) := do + AsyncList.unfoldAsync (nextCmdSnap m . cancelTk hOut) initSnap +end Elab - /-- Use `leanpkg print-paths` to compile dependencies on the fly and add them to LEAN_PATH. -/ - partial def leanpkgSetupSearchPath (leanpkgPath : String) (m : DocumentMeta) (imports : Array Import) : ServerM Unit := do +-- Pending requests are tracked so they can be cancelled +abbrev PendingRequestMap := RBMap RequestID (Task (Except IO.Error Unit)) (fun a b => Decidable.decide (a < b)) + +structure ServerContext where + hIn : FS.Stream + hOut : FS.Stream + hLog : FS.Stream + srcSearchPath : SearchPath + docRef : IO.Ref EditableDocument + pendingRequestsRef : IO.Ref PendingRequestMap + +abbrev ServerM := ReaderT ServerContext IO + +/- Worker initialization sequence. -/ +section Initialization + /-- Use `leanpkg print-paths` to compile dependencies on the fly and add them to `LEAN_PATH`. + Compilation progress is reported to `hOut` via LSP notifications. Return the search path for + source files. -/ + partial def leanpkgSetupSearchPath (leanpkgPath : String) (m : DocumentMeta) (imports : Array Import) (hOut : FS.Stream) : IO SearchPath := do let leanpkgProc ← Process.spawn { stdin := Process.Stdio.null stdout := Process.Stdio.piped @@ -161,7 +165,6 @@ section ServerM cmd := leanpkgPath args := #["print-paths"] ++ imports.map (toString ·.module) } - let hOut := (← read).hOut -- progress notification: report latest stderr line let rec processStderr (acc : String) : IO String := do let line ← leanpkgProc.stderr.getLine @@ -183,23 +186,31 @@ section ServerM let stderr ← IO.ofExcept stderr.get if (← leanpkgProc.wait) == 0 then match stdout.split (· == '\n') with - | [""] => pure () -- e.g. no leanpkg.toml - | [leanPath, leanSrcPath] => searchPathRef.set (← parseSearchPath leanPath (← getBuiltinSearchPath)) - | _ => throw <| IO.userError s!"unexpected output from `leanpkg src-paths`:\n{stdout}\nstderr:{stderr}" + | [""] => pure [] -- e.g. no leanpkg.toml + | [leanPath, leanSrcPath] => let sp ← getBuiltinSearchPath + let sp ← addSearchPathFromEnv sp + let sp ← parseSearchPath leanPath sp + searchPathRef.set sp + let srcPath := parseSearchPath leanSrcPath + srcPath.mapM realPathNormalized + | _ => throw <| IO.userError s!"unexpected output from `leanpkg print-paths`:\n{stdout}\nstderr:\n{stderr}" else - throw <| IO.userError stderr + throw <| IO.userError s!"`leanpkg print-paths` failed:\n{stdout}\nstderr:\n{stderr}" - /-- Compiles the contents of a Lean file. -/ - def compileDocument (m : DocumentMeta) : ServerM Unit := do + def compileHeader (m : DocumentMeta) (hOut : FS.Stream) : IO (Snapshot × SearchPath) := do let opts := {} -- TODO let inputCtx := Parser.mkInputContext m.text.source "" let (headerStx, headerParserState, msgLog) ← Parser.parseHeader inputCtx let leanpkgPath ← match ← IO.getEnv "LEAN_SYSROOT" with | some path => s!"{path}/bin/leanpkg{System.FilePath.exeSuffix}" | _ => s!"{← appDir}/leanpkg{System.FilePath.exeSuffix}" + let mut srcSearchPath := match (← IO.getEnv "LEAN_SRC_PATH") with + | some p => parseSearchPath p + | none => [] -- NOTE: leanpkg does not exist in stage 0 (yet?) if (← fileExists leanpkgPath) then - leanpkgSetupSearchPath leanpkgPath m (Lean.Elab.headerToImports headerStx).toArray + let pkgSearchPath ← leanpkgSetupSearchPath leanpkgPath m (Lean.Elab.headerToImports headerStx).toArray hOut + srcSearchPath := srcSearchPath ++ pkgSearchPath let (headerEnv, msgLog) ← Elab.processHeader headerStx opts msgLog inputCtx let cmdState := Elab.Command.mkState headerEnv msgLog opts let opts := opts.setBool `interpreter.prefer_native false @@ -210,9 +221,34 @@ section ServerM mpState := headerParserState data := SnapshotData.headerData cmdState } + return (headerSnap, srcSearchPath) + + def initializeWorker (p : DidOpenTextDocumentParams) (i o e : FS.Stream) + : IO ServerContext := do + let doc := p.textDocument + /- NOTE(WN): `toFileMap` marks line beginnings as immediately following + "\n", which should be enough to handle both LF and CRLF correctly. + This is because LSP always refers to characters by (line, column), + so if we get the line number correct it shouldn't matter that there + is a CR there. -/ + let meta : DocumentMeta := ⟨doc.uri, doc.version, doc.text.toFileMap⟩ + let (headerSnap, srcSearchPath) ← compileHeader meta o let cancelTk ← CancelToken.new - let cmdSnaps ← unfoldCmdSnaps m headerSnap cancelTk - (←read).docRef.set ⟨m, headerSnap, cmdSnaps, cancelTk⟩ + let cmdSnaps ← unfoldCmdSnaps meta headerSnap cancelTk o + let doc : EditableDocument := ⟨meta, headerSnap, cmdSnaps, cancelTk⟩ + return { + hIn := i + hOut := o + hLog := e + srcSearchPath := srcSearchPath + docRef := ←IO.mkRef doc + pendingRequestsRef := ←IO.mkRef RBMap.empty + } +end Initialization + +section Updates + def updatePendingRequests (map : PendingRequestMap → PendingRequestMap) : ServerM Unit := do + (←read).pendingRequestsRef.modify map /-- Given the new document and `changePos`, the UTF-8 offset of a change into the pre-change source, updates editable doc state. -/ @@ -239,7 +275,7 @@ section ServerM let mut validSnaps := cmdSnaps.finishedPrefix.takeWhile (fun s => s.endPos < changePos) if validSnaps.length = 0 then let cancelTk ← CancelToken.new - let newCmdSnaps ← unfoldCmdSnaps newMeta newHeaderSnap cancelTk + let newCmdSnaps ← unfoldCmdSnaps newMeta newHeaderSnap cancelTk st.hOut st.docRef.set ⟨newMeta, newHeaderSnap, newCmdSnaps, cancelTk⟩ else /- When at least one valid non-header snap exists, it may happen that a change does not fall @@ -257,23 +293,14 @@ section ServerM validSnaps ← validSnaps.dropLast lastSnap ← preLastSnap let cancelTk ← CancelToken.new - let newSnaps ← unfoldCmdSnaps newMeta lastSnap cancelTk + let newSnaps ← unfoldCmdSnaps newMeta lastSnap cancelTk st.hOut let newCmdSnaps := AsyncList.ofList validSnaps ++ newSnaps st.docRef.set ⟨newMeta, newHeaderSnap, newCmdSnaps, cancelTk⟩ -end ServerM +end Updates /- Notifications are handled in the main thread. They may change global worker state such as the current file contents. -/ section NotificationHandling - def handleDidOpen (p : DidOpenTextDocumentParams) : ServerM Unit := - let doc := p.textDocument - /- NOTE(WN): `toFileMap` marks line beginnings as immediately following - "\n", which should be enough to handle both LF and CRLF correctly. - This is because LSP always refers to characters by (line, column), - so if we get the line number correct it shouldn't matter that there - is a CR there. -/ - compileDocument ⟨doc.uri, doc.version, doc.text.toFileMap⟩ - def handleDidChange (p : DidChangeTextDocumentParams) : ServerM Unit := do let docId := p.textDocument let changes := p.contentChanges @@ -313,6 +340,23 @@ section RequestHandling def mapTask (t : Task α) (f : α → ExceptT RequestError ServerM β) : RequestM β := fun st => (IO.mapTask · t) fun a => f a st + /-- Create a task which waits for a snapshot matching `p`, handles various errors, + and if a matching snapshot was found executes `x` with it. If not found, the task + executes `notFoundX`. -/ + def withWaitFindSnap (doc : EditableDocument) (p : Snapshot → Bool) + (notFoundX : ExceptT RequestError ServerM β) + (x : Snapshot → ExceptT RequestError ServerM β) + : ServerM (Task (Except IO.Error (Except RequestError β))) := do + let findTask ← doc.cmdSnaps.waitFind? p + mapTask findTask fun + | Except.error ElabTaskError.aborted => + throwThe RequestError RequestError.fileChanged + | Except.error (ElabTaskError.ioError e) => + throwThe IO.Error e + | Except.error ElabTaskError.eof => notFoundX + | Except.ok none => notFoundX + | Except.ok (some snap) => x snap + /- Requests that need data from a certain command should traverse the snapshots by successively getting the next task, meaning that we might need to wait for elaboration. When that happens, the request should send a "content changed" error to the user @@ -325,55 +369,23 @@ section RequestHandling let st ← read let doc ← st.docRef.get let text := doc.meta.text - let hoverPos := text.lspPosToUtf8Pos p.position - let findTask ← doc.cmdSnaps.waitFind? (fun s => s.endPos > hoverPos) let mkHover (s : String) (f : String.Pos) (t : String.Pos) : Hover := { contents := { kind := MarkupKind.markdown value := s } range? := some { start := text.utf8PosToLspPos f «end» := text.utf8PosToLspPos t } } - mapTask findTask fun - | Except.error ElabTaskError.aborted => - throwThe RequestError RequestError.fileChanged - | Except.error (ElabTaskError.ioError e) => - throwThe IO.Error e - | Except.error ElabTaskError.eof => - return none - | Except.ok (some snap) => do - for t in snap.toCmdState.infoState.trees do - let ts := t.smallestNodes fun - | Info.ofTermInfo i => - match i.pos?, i.tailPos? with - | some pos, some tailPos => - /- TODO(WN): when we have a way to do so, - check for synthetic syntax and allow arbitrary syntax kinds. -/ - if pos ≤ hoverPos ∧ hoverPos < tailPos then - #[identKind, - strLitKind, - charLitKind, - numLitKind, - scientificLitKind, - nameLitKind, - fieldIdxKind, - interpolatedStrLitKind, - interpolatedStrKind - ].contains i.stx.getKind - else false - | _, _ => false - | _ => false - let mut nds : Array (Nat × ContextInfo × TermInfo) := #[] - for t in ts do - if let InfoTree.context ci (InfoTree.node (Info.ofTermInfo i) _) := t then - let diff := i.tailPos?.get! - i.pos?.get! - nds := nds.push (diff, ci, i) - if let some (_, ci, i) := nds.getMax? (fun a b => a.1 > b.1) then + let hoverPos := text.lspPosToUtf8Pos p.position + withWaitFindSnap doc (fun s => s.endPos > hoverPos) + (notFoundX := pure none) fun snap => do + for t in snap.toCmdState.infoState.trees do + if let some (ci, i) := t.hoverableTermAt? hoverPos then let tFmt ← ci.runMetaM i.lctx do return f!"{← Meta.ppExpr i.expr} : {← Meta.ppExpr (← Meta.inferType i.expr)}" let mut hoverFmt := f!"```lean {tFmt} ```" - if let Expr.const n .. := i.expr then + if let some n := i.expr.constName? then if let some doc ← ci.runMetaM i.lctx <| findDocString? n then hoverFmt := f!"{hoverFmt}\n***\n{doc}" @@ -381,14 +393,42 @@ section RequestHandling pure () return none - | Except.ok none => return none - def handleWaitForDiagnostics (id : RequestID) (p : WaitForDiagnosticsParam) - : ServerM (Task (Except IO.Error (Except RequestError WaitForDiagnostics))) := do + open Elab in + partial def handleDefinition (goToType? : Bool) (id : RequestID) (p : TextDocumentPositionParams) + : ServerM (Task (Except IO.Error (Except RequestError (Array LocationLink)))) := do let st ← read let doc ← st.docRef.get - let t ← doc.cmdSnaps.waitAll - t.map fun _ => Except.ok $ Except.ok WaitForDiagnostics.mk + let text := doc.meta.text + let hoverPos := text.lspPosToUtf8Pos p.position + withWaitFindSnap doc (fun s => s.endPos > hoverPos) + (notFoundX := pure #[]) fun snap => do + for t in snap.toCmdState.infoState.trees do + if let some (ci, i) := t.hoverableTermAt? hoverPos then + let expr := if goToType? then ← ci.runMetaM i.lctx <| Meta.inferType i.expr + else i.expr + if let some n := expr.constName? then + let mod? ← ci.runMetaM i.lctx <| findModuleOf? n + let modUri? ← match mod? with + | some modName => + let modFname? ← st.srcSearchPath.findWithExt ".lean" modName + pure <| modFname?.map ("file://" ++ ·) + | none => pure <| some doc.meta.uri + + let ranges? ← ci.runMetaM i.lctx <| findDeclarationRanges? n + + if let (some ranges, some modUri) := (ranges?, modUri?) then + let declRangeToLspRange (r : DeclarationRange) : Lsp.Range := + { start := ⟨r.pos.line - 1, r.charUtf16⟩ + «end» := ⟨r.endPos.line - 1, r.endCharUtf16⟩ } + let ll : LocationLink := { + originSelectionRange? := some ⟨text.utf8PosToLspPos i.pos?.get!, text.utf8PosToLspPos i.tailPos?.get!⟩ + targetUri := modUri + targetRange := declRangeToLspRange ranges.range + targetSelectionRange := declRangeToLspRange ranges.selectionRange + } + return #[ll] + return #[] def rangeOfSyntax (text : FileMap) (stx : Syntax) : Range := ⟨text.utf8PosToLspPos <| stx.getHeadInfo.get!.pos.get!, @@ -449,6 +489,13 @@ section RequestHandling children? := syms.toArray } :: syms', stxs'') + def handleWaitForDiagnostics (id : RequestID) (p : WaitForDiagnosticsParam) + : ServerM (Task (Except IO.Error (Except RequestError WaitForDiagnostics))) := do + let st ← read + let doc ← st.docRef.get + let t ← doc.cmdSnaps.waitAll + t.map fun _ => Except.ok $ Except.ok WaitForDiagnostics.mk + end RequestHandling section MessageHandling @@ -487,6 +534,9 @@ section MessageHandling match method with | "textDocument/waitForDiagnostics" => handle WaitForDiagnosticsParam WaitForDiagnostics handleWaitForDiagnostics | "textDocument/hover" => handle HoverParams (Option Hover) handleHover + | "textDocument/declaration" => handle TextDocumentPositionParams (Array LocationLink) <| handleDefinition (goToType? := false) + | "textDocument/definition" => handle TextDocumentPositionParams (Array LocationLink) <| handleDefinition (goToType? := false) + | "textDocument/typeDefinition" => handle TextDocumentPositionParams (Array LocationLink) <| handleDefinition (goToType? := true) | "textDocument/documentSymbol" => handle DocumentSymbolParams DocumentSymbolResult handleDocumentSymbol | _ => throwServerError s!"Got unsupported request: {method}" end MessageHandling @@ -529,17 +579,9 @@ def initAndRunWorker (i o e : FS.Stream) : IO UInt32 := do let ⟨_, param⟩ ← i.readLspNotificationAs "textDocument/didOpen" DidOpenTextDocumentParams let e ← e.withPrefix s!"[{param.textDocument.uri}] " let _ ← IO.setStderr e - let ctx : ServerContext := { - hIn := i - hOut := o - hLog := e - -- `openDocument` will not access `docRef`, but set it - docRef := ←IO.mkRef arbitrary - pendingRequestsRef := ←IO.mkRef (RBMap.empty : PendingRequestMap) - } - ReaderT.run (r := ctx) try - handleDidOpen param - mainLoop + try + let ctx ← initializeWorker param i o e + ReaderT.run (r := ctx) mainLoop return 0 catch e => o.writeLspNotification { @@ -565,4 +607,3 @@ def workerMain : IO UInt32 := do return (1 : UInt32) end Lean.Server.FileWorker - diff --git a/stage0/src/Lean/Server/InfoUtils.lean b/stage0/src/Lean/Server/InfoUtils.lean index c81742b9d4..3cbe1825ea 100644 --- a/stage0/src/Lean/Server/InfoUtils.lean +++ b/stage0/src/Lean/Server/InfoUtils.lean @@ -45,4 +45,36 @@ def TacticInfo.pos? (i : TacticInfo) : Option String.Pos := def TacticInfo.tailPos? (i : TacticInfo) : Option String.Pos := i.stx.getTailPos +/-- Find a `TermInfo`, if any, which should be shown on hover/cursor at position `hoverPos`. -/ +partial def InfoTree.hoverableTermAt? (t : InfoTree) (hoverPos : String.Pos) : Option (ContextInfo × TermInfo) := + let ts := t.smallestNodes fun + | Info.ofTermInfo i => + match i.pos?, i.tailPos? with + | some pos, some tailPos => + /- TODO(WN): when we have a way to do so, + check for synthetic syntax and allow arbitrary syntax kinds. -/ + if pos ≤ hoverPos ∧ hoverPos < tailPos then + #[identKind, + strLitKind, + charLitKind, + numLitKind, + scientificLitKind, + nameLitKind, + fieldIdxKind, + interpolatedStrLitKind, + interpolatedStrKind + ].contains i.stx.getKind + else false + | _, _ => false + | _ => false + + let terms : List (Nat × ContextInfo × TermInfo) := ts.filterMap (fun + | context ci (node (Info.ofTermInfo i) _) => + let diff := i.tailPos?.get! - i.pos?.get! + some (diff, ci, i) + | _ => none + ) + + terms.toArray.getMax? (fun a b => a.1 > b.1) |>.map fun (_, ci, i) => (ci, i) + end Lean.Elab diff --git a/stage0/src/Lean/Server/Watchdog.lean b/stage0/src/Lean/Server/Watchdog.lean index 6cb4c8d039..6f6c8b3c61 100644 --- a/stage0/src/Lean/Server/Watchdog.lean +++ b/stage0/src/Lean/Server/Watchdog.lean @@ -355,6 +355,9 @@ section MessageHandling match method with | "textDocument/waitForDiagnostics" => handle WaitForDiagnosticsParam | "textDocument/hover" => handle HoverParams + | "textDocument/declaration" => handle DeclarationParams + | "textDocument/definition" => handle DefinitionParams + | "textDocument/typeDefinition" => handle TypeDefinitionParams | "textDocument/documentSymbol" => handle DocumentSymbolParams | _ => (←read).hOut.writeLspResponseError @@ -437,6 +440,9 @@ def mkLeanServerCapabilities : ServerCapabilities := { save? := none } hoverProvider := true + declarationProvider := true + definitionProvider := true + typeDefinitionProvider := true documentSymbolProvider := true } diff --git a/stage0/src/Lean/Util/Path.lean b/stage0/src/Lean/Util/Path.lean index ec273e533b..72dad5e30a 100644 --- a/stage0/src/Lean/Util/Path.lean +++ b/stage0/src/Lean/Util/Path.lean @@ -18,15 +18,32 @@ def realPathNormalized (fname : String) : IO String := do let fname ← IO.realPath fname pure (System.FilePath.normalizePath fname) +def modPathToFilePath : Name → String + | Name.str p h _ => modPathToFilePath p ++ pathSep ++ h + | Name.anonymous => "" + | Name.num p _ _ => panic! "ill-formed import" + abbrev SearchPath := List String +namespace SearchPath + +/-- If the package of `mod` can be found in `sp`, return the path with extension +`ext` (`.lean` or `.olean`) corresponding to `mod`. Otherwise, return `none.` -/ +def findWithExt (sp : SearchPath) (ext : String) (mod : Name) : IO (Option String) := do + let pkg := mod.getRoot.toString + let root? ← sp.findM? (fun path => + IO.isDir s!"{path}{pathSep}{pkg}" <||> IO.fileExists s!"{path}{pathSep}{pkg}{ext}") + return root?.map (· ++ modPathToFilePath mod ++ ext) + +end SearchPath + builtin_initialize searchPathRef : IO.Ref SearchPath ← IO.mkRef {} -def parseSearchPath (path : String) (sp : SearchPath := ∅) : IO SearchPath := - pure $ System.FilePath.splitSearchPath path ++ sp +def parseSearchPath (path : String) (sp : SearchPath := ∅) : SearchPath := + System.FilePath.splitSearchPath path ++ sp @[extern c inline "LEAN_IS_STAGE0"] -constant isStage0 (u : Unit) : Bool +private constant isStage0 (u : Unit) : Bool def getBuiltinSearchPath : IO SearchPath := do let appDir ← IO.appDir @@ -42,23 +59,17 @@ def addSearchPathFromEnv (sp : SearchPath) : IO SearchPath := do @[export lean_init_search_path] def initSearchPath (path : Option String := none) : IO Unit := match path with - | some path => parseSearchPath path >>= searchPathRef.set + | some path => searchPathRef.set <| parseSearchPath path | none => do let sp ← getBuiltinSearchPath let sp ← addSearchPathFromEnv sp searchPathRef.set sp -def modPathToFilePath : Name → String - | Name.str p h _ => modPathToFilePath p ++ pathSep ++ h - | Name.anonymous => "" - | Name.num p _ _ => panic! "ill-formed import" - def findOLean (mod : Name) : IO String := do let sp ← searchPathRef.get - let pkg := mod.getRoot.toString - let some root ← sp.findM? (fun path => IO.isDir s!"{path}{pathSep}{pkg}" <||> IO.fileExists s!"{path}{pathSep}{pkg}.olean") - | throw $ IO.userError $ "unknown package '" ++ pkg ++ "'" - pure $ root ++ modPathToFilePath mod ++ ".olean" + let some fname ← sp.findWithExt ".olean" mod + | throw $ IO.userError $ "unknown package '" ++ mod.getRoot.toString ++ "'" + return fname /-- Infer module name of source file name. -/ @[export lean_module_name_of_file] diff --git a/stage0/stdlib/CMakeLists.txt b/stage0/stdlib/CMakeLists.txt index 51c5a9ba9f..8765fe2209 100644 --- a/stage0/stdlib/CMakeLists.txt +++ b/stage0/stdlib/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT ./Init.c ./Init/Classical.c ./Init/Coe.c ./Init/Control.c ./Init/Control/Basic.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Id.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Control/StateRef.c ./Init/Core.c ./Init/Data.c ./Init/Data/Array.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/InsertionSort.c ./Init/Data/Array/QSort.c ./Init/Data/Array/Subarray.c ./Init/Data/Basic.c ./Init/Data/ByteArray.c ./Init/Data/ByteArray/Basic.c ./Init/Data/Char.c ./Init/Data/Char/Basic.c ./Init/Data/Fin.c ./Init/Data/Fin/Basic.c ./Init/Data/Float.c ./Init/Data/FloatArray.c ./Init/Data/FloatArray/Basic.c ./Init/Data/Format.c ./Init/Data/Format/Basic.c ./Init/Data/Format/Instances.c ./Init/Data/Format/Macro.c ./Init/Data/Hashable.c ./Init/Data/Int.c ./Init/Data/Int/Basic.c ./Init/Data/List.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Control.c ./Init/Data/Nat.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Control.c ./Init/Data/Nat/Div.c ./Init/Data/OfScientific.c ./Init/Data/Option.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Instances.c ./Init/Data/Random.c ./Init/Data/Range.c ./Init/Data/Repr.c ./Init/Data/Stream.c ./Init/Data/String.c ./Init/Data/String/Basic.c ./Init/Data/String/Extra.c ./Init/Data/ToString.c ./Init/Data/ToString/Basic.c ./Init/Data/ToString/Macro.c ./Init/Data/UInt.c ./Init/Fix.c ./Init/Meta.c ./Init/Notation.c ./Init/NotationExtra.c ./Init/Prelude.c ./Init/SimpLemmas.c ./Init/SizeOf.c ./Init/System.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/IOError.c ./Init/System/Platform.c ./Init/System/ST.c ./Init/Util.c ./Init/WF.c ./Lean.c ./Lean/Attributes.c ./Lean/AuxRecursor.c ./Lean/Class.c ./Lean/Compiler.c ./Lean/Compiler/BorrowedAnnotation.c ./Lean/Compiler/ClosedTermCache.c ./Lean/Compiler/ConstFolding.c ./Lean/Compiler/ExportAttr.c ./Lean/Compiler/ExternAttr.c ./Lean/Compiler/IR.c ./Lean/Compiler/IR/Basic.c ./Lean/Compiler/IR/Borrow.c ./Lean/Compiler/IR/Boxing.c ./Lean/Compiler/IR/Checker.c ./Lean/Compiler/IR/CompilerM.c ./Lean/Compiler/IR/CtorLayout.c ./Lean/Compiler/IR/ElimDeadBranches.c ./Lean/Compiler/IR/ElimDeadVars.c ./Lean/Compiler/IR/EmitC.c ./Lean/Compiler/IR/EmitUtil.c ./Lean/Compiler/IR/ExpandResetReuse.c ./Lean/Compiler/IR/Format.c ./Lean/Compiler/IR/FreeVars.c ./Lean/Compiler/IR/LiveVars.c ./Lean/Compiler/IR/NormIds.c ./Lean/Compiler/IR/PushProj.c ./Lean/Compiler/IR/RC.c ./Lean/Compiler/IR/ResetReuse.c ./Lean/Compiler/IR/SimpCase.c ./Lean/Compiler/IR/UnboxResult.c ./Lean/Compiler/ImplementedByAttr.c ./Lean/Compiler/InitAttr.c ./Lean/Compiler/InlineAttrs.c ./Lean/Compiler/NameMangling.c ./Lean/Compiler/NeverExtractAttr.c ./Lean/Compiler/Specialize.c ./Lean/Compiler/Util.c ./Lean/CoreM.c ./Lean/Data.c ./Lean/Data/Format.c ./Lean/Data/Json.c ./Lean/Data/Json/Basic.c ./Lean/Data/Json/FromToJson.c ./Lean/Data/Json/Parser.c ./Lean/Data/Json/Printer.c ./Lean/Data/Json/Stream.c ./Lean/Data/JsonRpc.c ./Lean/Data/KVMap.c ./Lean/Data/LBool.c ./Lean/Data/LOption.c ./Lean/Data/Lsp.c ./Lean/Data/Lsp/Basic.c ./Lean/Data/Lsp/Capabilities.c ./Lean/Data/Lsp/Communication.c ./Lean/Data/Lsp/Diagnostics.c ./Lean/Data/Lsp/Extra.c ./Lean/Data/Lsp/InitShutdown.c ./Lean/Data/Lsp/Ipc.c ./Lean/Data/Lsp/LanguageFeatures.c ./Lean/Data/Lsp/TextSync.c ./Lean/Data/Lsp/Utf16.c ./Lean/Data/Lsp/Workspace.c ./Lean/Data/Name.c ./Lean/Data/NameTrie.c ./Lean/Data/Occurrences.c ./Lean/Data/OpenDecl.c ./Lean/Data/Options.c ./Lean/Data/Position.c ./Lean/Data/PrefixTree.c ./Lean/Data/SMap.c ./Lean/Data/Trie.c ./Lean/Declaration.c ./Lean/DeclarationRange.c ./Lean/DocString.c ./Lean/Elab.c ./Lean/Elab/App.c ./Lean/Elab/Attributes.c ./Lean/Elab/AutoBound.c ./Lean/Elab/Binders.c ./Lean/Elab/BuiltinNotation.c ./Lean/Elab/CollectFVars.c ./Lean/Elab/Command.c ./Lean/Elab/DeclModifiers.c ./Lean/Elab/DeclUtil.c ./Lean/Elab/Declaration.c ./Lean/Elab/DeclarationRange.c ./Lean/Elab/DefView.c ./Lean/Elab/Deriving.c ./Lean/Elab/Deriving/BEq.c ./Lean/Elab/Deriving/Basic.c ./Lean/Elab/Deriving/DecEq.c ./Lean/Elab/Deriving/FromToJson.c ./Lean/Elab/Deriving/Inhabited.c ./Lean/Elab/Deriving/Repr.c ./Lean/Elab/Deriving/Util.c ./Lean/Elab/Do.c ./Lean/Elab/Exception.c ./Lean/Elab/Frontend.c ./Lean/Elab/Import.c ./Lean/Elab/Inductive.c ./Lean/Elab/InfoTree.c ./Lean/Elab/LetRec.c ./Lean/Elab/Level.c ./Lean/Elab/Log.c ./Lean/Elab/Match.c ./Lean/Elab/MutualDef.c ./Lean/Elab/PreDefinition.c ./Lean/Elab/PreDefinition/Basic.c ./Lean/Elab/PreDefinition/Main.c ./Lean/Elab/PreDefinition/MkInhabitant.c ./Lean/Elab/PreDefinition/Structural.c ./Lean/Elab/PreDefinition/WF.c ./Lean/Elab/Print.c ./Lean/Elab/Quotation.c ./Lean/Elab/Quotation/Util.c ./Lean/Elab/StructInst.c ./Lean/Elab/Structure.c ./Lean/Elab/Syntax.c ./Lean/Elab/SyntheticMVars.c ./Lean/Elab/Tactic.c ./Lean/Elab/Tactic/Basic.c ./Lean/Elab/Tactic/Binders.c ./Lean/Elab/Tactic/ElabTerm.c ./Lean/Elab/Tactic/Generalize.c ./Lean/Elab/Tactic/Induction.c ./Lean/Elab/Tactic/Injection.c ./Lean/Elab/Tactic/Location.c ./Lean/Elab/Tactic/Match.c ./Lean/Elab/Tactic/Rewrite.c ./Lean/Elab/Tactic/Simp.c ./Lean/Elab/Term.c ./Lean/Elab/Util.c ./Lean/Environment.c ./Lean/Eval.c ./Lean/Exception.c ./Lean/Expr.c ./Lean/HeadIndex.c ./Lean/Hygiene.c ./Lean/InternalExceptionId.c ./Lean/KeyedDeclsAttribute.c ./Lean/Level.c ./Lean/LocalContext.c ./Lean/Message.c ./Lean/Meta.c ./Lean/Meta/AbstractMVars.c ./Lean/Meta/AbstractNestedProofs.c ./Lean/Meta/AppBuilder.c ./Lean/Meta/Basic.c ./Lean/Meta/Check.c ./Lean/Meta/Closure.c ./Lean/Meta/CollectMVars.c ./Lean/Meta/DiscrTree.c ./Lean/Meta/DiscrTreeTypes.c ./Lean/Meta/ExprDefEq.c ./Lean/Meta/ForEachExpr.c ./Lean/Meta/FunInfo.c ./Lean/Meta/GeneralizeTelescope.c ./Lean/Meta/GetConst.c ./Lean/Meta/Inductive.c ./Lean/Meta/InferType.c ./Lean/Meta/Instances.c ./Lean/Meta/KAbstract.c ./Lean/Meta/LevelDefEq.c ./Lean/Meta/Match.c ./Lean/Meta/Match/Basic.c ./Lean/Meta/Match/CaseArraySizes.c ./Lean/Meta/Match/CaseValues.c ./Lean/Meta/Match/MVarRenaming.c ./Lean/Meta/Match/Match.c ./Lean/Meta/Match/MatchPatternAttr.c ./Lean/Meta/Match/MatcherInfo.c ./Lean/Meta/MatchUtil.c ./Lean/Meta/Offset.c ./Lean/Meta/PPGoal.c ./Lean/Meta/RecursorInfo.c ./Lean/Meta/Reduce.c ./Lean/Meta/ReduceEval.c ./Lean/Meta/SynthInstance.c ./Lean/Meta/Tactic.c ./Lean/Meta/Tactic/Apply.c ./Lean/Meta/Tactic/Assert.c ./Lean/Meta/Tactic/Assumption.c ./Lean/Meta/Tactic/Cases.c ./Lean/Meta/Tactic/Clear.c ./Lean/Meta/Tactic/Constructor.c ./Lean/Meta/Tactic/Delta.c ./Lean/Meta/Tactic/ElimInfo.c ./Lean/Meta/Tactic/FVarSubst.c ./Lean/Meta/Tactic/Generalize.c ./Lean/Meta/Tactic/Induction.c ./Lean/Meta/Tactic/Injection.c ./Lean/Meta/Tactic/Intro.c ./Lean/Meta/Tactic/Replace.c ./Lean/Meta/Tactic/Revert.c ./Lean/Meta/Tactic/Rewrite.c ./Lean/Meta/Tactic/Simp.c ./Lean/Meta/Tactic/Simp/Main.c ./Lean/Meta/Tactic/Simp/Rewrite.c ./Lean/Meta/Tactic/Simp/SimpLemmas.c ./Lean/Meta/Tactic/Simp/Types.c ./Lean/Meta/Tactic/Subst.c ./Lean/Meta/Tactic/Util.c ./Lean/Meta/Transform.c ./Lean/Meta/TransparencyMode.c ./Lean/Meta/UnificationHint.c ./Lean/Meta/WHNF.c ./Lean/MetavarContext.c ./Lean/Modifiers.c ./Lean/MonadEnv.c ./Lean/Parser.c ./Lean/Parser/Attr.c ./Lean/Parser/Basic.c ./Lean/Parser/Command.c ./Lean/Parser/Do.c ./Lean/Parser/Extension.c ./Lean/Parser/Extra.c ./Lean/Parser/Level.c ./Lean/Parser/Module.c ./Lean/Parser/StrInterpolation.c ./Lean/Parser/Syntax.c ./Lean/Parser/Tactic.c ./Lean/Parser/Term.c ./Lean/ParserCompiler.c ./Lean/ParserCompiler/Attribute.c ./Lean/PrettyPrinter.c ./Lean/PrettyPrinter/Basic.c ./Lean/PrettyPrinter/Delaborator.c ./Lean/PrettyPrinter/Delaborator/Basic.c ./Lean/PrettyPrinter/Delaborator/Builtins.c ./Lean/PrettyPrinter/Formatter.c ./Lean/PrettyPrinter/Parenthesizer.c ./Lean/ProjFns.c ./Lean/ReducibilityAttrs.c ./Lean/ResolveName.c ./Lean/Runtime.c ./Lean/ScopedEnvExtension.c ./Lean/Server.c ./Lean/Server/AsyncList.c ./Lean/Server/FileSource.c ./Lean/Server/FileWorker.c ./Lean/Server/InfoUtils.c ./Lean/Server/Snapshots.c ./Lean/Server/Utils.c ./Lean/Server/Watchdog.c ./Lean/Structure.c ./Lean/Syntax.c ./Lean/ToExpr.c ./Lean/Util.c ./Lean/Util/CollectFVars.c ./Lean/Util/CollectLevelParams.c ./Lean/Util/CollectMVars.c ./Lean/Util/Constructions.c ./Lean/Util/FindExpr.c ./Lean/Util/FindMVar.c ./Lean/Util/FoldConsts.c ./Lean/Util/ForEachExpr.c ./Lean/Util/MonadCache.c ./Lean/Util/PPExt.c ./Lean/Util/Path.c ./Lean/Util/Profile.c ./Lean/Util/RecDepth.c ./Lean/Util/Recognizers.c ./Lean/Util/ReplaceExpr.c ./Lean/Util/ReplaceLevel.c ./Lean/Util/SCC.c ./Lean/Util/Sorry.c ./Lean/Util/Trace.c ./Leanpkg.c ./Leanpkg/Git.c ./Leanpkg/LeanVersion.c ./Leanpkg/Manifest.c ./Leanpkg/Proc.c ./Leanpkg/Resolve.c ./Leanpkg/Toml.c ./Std.c ./Std/Data.c ./Std/Data/AssocList.c ./Std/Data/BinomialHeap.c ./Std/Data/DList.c ./Std/Data/HashMap.c ./Std/Data/HashSet.c ./Std/Data/PersistentArray.c ./Std/Data/PersistentHashMap.c ./Std/Data/PersistentHashSet.c ./Std/Data/Queue.c ./Std/Data/RBMap.c ./Std/Data/RBTree.c ./Std/Data/Stack.c ./Std/ShareCommon.c ) +add_library (stage0 OBJECT ./Init.c ./Init/Classical.c ./Init/Coe.c ./Init/Control.c ./Init/Control/Basic.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Id.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Control/StateRef.c ./Init/Core.c ./Init/Data.c ./Init/Data/Array.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/InsertionSort.c ./Init/Data/Array/QSort.c ./Init/Data/Array/Subarray.c ./Init/Data/Basic.c ./Init/Data/ByteArray.c ./Init/Data/ByteArray/Basic.c ./Init/Data/Char.c ./Init/Data/Char/Basic.c ./Init/Data/Fin.c ./Init/Data/Fin/Basic.c ./Init/Data/Float.c ./Init/Data/FloatArray.c ./Init/Data/FloatArray/Basic.c ./Init/Data/Format.c ./Init/Data/Format/Basic.c ./Init/Data/Format/Instances.c ./Init/Data/Format/Macro.c ./Init/Data/Hashable.c ./Init/Data/Int.c ./Init/Data/Int/Basic.c ./Init/Data/List.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Control.c ./Init/Data/Nat.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Control.c ./Init/Data/Nat/Div.c ./Init/Data/OfScientific.c ./Init/Data/Option.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Instances.c ./Init/Data/Random.c ./Init/Data/Range.c ./Init/Data/Repr.c ./Init/Data/Stream.c ./Init/Data/String.c ./Init/Data/String/Basic.c ./Init/Data/String/Extra.c ./Init/Data/ToString.c ./Init/Data/ToString/Basic.c ./Init/Data/ToString/Macro.c ./Init/Data/UInt.c ./Init/Fix.c ./Init/Meta.c ./Init/Notation.c ./Init/NotationExtra.c ./Init/Prelude.c ./Init/SimpLemmas.c ./Init/SizeOf.c ./Init/System.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/IOError.c ./Init/System/Platform.c ./Init/System/ST.c ./Init/Util.c ./Init/WF.c ./Lean.c ./Lean/Attributes.c ./Lean/AuxRecursor.c ./Lean/Class.c ./Lean/Compiler.c ./Lean/Compiler/BorrowedAnnotation.c ./Lean/Compiler/ClosedTermCache.c ./Lean/Compiler/ConstFolding.c ./Lean/Compiler/ExportAttr.c ./Lean/Compiler/ExternAttr.c ./Lean/Compiler/IR.c ./Lean/Compiler/IR/Basic.c ./Lean/Compiler/IR/Borrow.c ./Lean/Compiler/IR/Boxing.c ./Lean/Compiler/IR/Checker.c ./Lean/Compiler/IR/CompilerM.c ./Lean/Compiler/IR/CtorLayout.c ./Lean/Compiler/IR/ElimDeadBranches.c ./Lean/Compiler/IR/ElimDeadVars.c ./Lean/Compiler/IR/EmitC.c ./Lean/Compiler/IR/EmitUtil.c ./Lean/Compiler/IR/ExpandResetReuse.c ./Lean/Compiler/IR/Format.c ./Lean/Compiler/IR/FreeVars.c ./Lean/Compiler/IR/LiveVars.c ./Lean/Compiler/IR/NormIds.c ./Lean/Compiler/IR/PushProj.c ./Lean/Compiler/IR/RC.c ./Lean/Compiler/IR/ResetReuse.c ./Lean/Compiler/IR/SimpCase.c ./Lean/Compiler/IR/UnboxResult.c ./Lean/Compiler/ImplementedByAttr.c ./Lean/Compiler/InitAttr.c ./Lean/Compiler/InlineAttrs.c ./Lean/Compiler/NameMangling.c ./Lean/Compiler/NeverExtractAttr.c ./Lean/Compiler/Specialize.c ./Lean/Compiler/Util.c ./Lean/CoreM.c ./Lean/Data.c ./Lean/Data/Format.c ./Lean/Data/Json.c ./Lean/Data/Json/Basic.c ./Lean/Data/Json/FromToJson.c ./Lean/Data/Json/Parser.c ./Lean/Data/Json/Printer.c ./Lean/Data/Json/Stream.c ./Lean/Data/JsonRpc.c ./Lean/Data/KVMap.c ./Lean/Data/LBool.c ./Lean/Data/LOption.c ./Lean/Data/Lsp.c ./Lean/Data/Lsp/Basic.c ./Lean/Data/Lsp/Capabilities.c ./Lean/Data/Lsp/Communication.c ./Lean/Data/Lsp/Diagnostics.c ./Lean/Data/Lsp/Extra.c ./Lean/Data/Lsp/InitShutdown.c ./Lean/Data/Lsp/Ipc.c ./Lean/Data/Lsp/LanguageFeatures.c ./Lean/Data/Lsp/TextSync.c ./Lean/Data/Lsp/Utf16.c ./Lean/Data/Lsp/Workspace.c ./Lean/Data/Name.c ./Lean/Data/NameTrie.c ./Lean/Data/Occurrences.c ./Lean/Data/OpenDecl.c ./Lean/Data/Options.c ./Lean/Data/Position.c ./Lean/Data/PrefixTree.c ./Lean/Data/SMap.c ./Lean/Data/Trie.c ./Lean/Declaration.c ./Lean/DeclarationRange.c ./Lean/DocString.c ./Lean/Elab.c ./Lean/Elab/App.c ./Lean/Elab/Attributes.c ./Lean/Elab/AutoBound.c ./Lean/Elab/Binders.c ./Lean/Elab/BuiltinNotation.c ./Lean/Elab/CollectFVars.c ./Lean/Elab/Command.c ./Lean/Elab/DeclModifiers.c ./Lean/Elab/DeclUtil.c ./Lean/Elab/Declaration.c ./Lean/Elab/DeclarationRange.c ./Lean/Elab/DefView.c ./Lean/Elab/Deriving.c ./Lean/Elab/Deriving/BEq.c ./Lean/Elab/Deriving/Basic.c ./Lean/Elab/Deriving/DecEq.c ./Lean/Elab/Deriving/FromToJson.c ./Lean/Elab/Deriving/Inhabited.c ./Lean/Elab/Deriving/Repr.c ./Lean/Elab/Deriving/Util.c ./Lean/Elab/Do.c ./Lean/Elab/Exception.c ./Lean/Elab/Frontend.c ./Lean/Elab/Import.c ./Lean/Elab/Inductive.c ./Lean/Elab/InfoTree.c ./Lean/Elab/LetRec.c ./Lean/Elab/Level.c ./Lean/Elab/Log.c ./Lean/Elab/Match.c ./Lean/Elab/MutualDef.c ./Lean/Elab/PreDefinition.c ./Lean/Elab/PreDefinition/Basic.c ./Lean/Elab/PreDefinition/Main.c ./Lean/Elab/PreDefinition/MkInhabitant.c ./Lean/Elab/PreDefinition/Structural.c ./Lean/Elab/PreDefinition/WF.c ./Lean/Elab/Print.c ./Lean/Elab/Quotation.c ./Lean/Elab/Quotation/Util.c ./Lean/Elab/StructInst.c ./Lean/Elab/Structure.c ./Lean/Elab/Syntax.c ./Lean/Elab/SyntheticMVars.c ./Lean/Elab/Tactic.c ./Lean/Elab/Tactic/Basic.c ./Lean/Elab/Tactic/Binders.c ./Lean/Elab/Tactic/ElabTerm.c ./Lean/Elab/Tactic/Generalize.c ./Lean/Elab/Tactic/Induction.c ./Lean/Elab/Tactic/Injection.c ./Lean/Elab/Tactic/Location.c ./Lean/Elab/Tactic/Match.c ./Lean/Elab/Tactic/Rewrite.c ./Lean/Elab/Tactic/Simp.c ./Lean/Elab/Term.c ./Lean/Elab/Util.c ./Lean/Environment.c ./Lean/Eval.c ./Lean/Exception.c ./Lean/Expr.c ./Lean/HeadIndex.c ./Lean/Hygiene.c ./Lean/InternalExceptionId.c ./Lean/KeyedDeclsAttribute.c ./Lean/Level.c ./Lean/LocalContext.c ./Lean/Message.c ./Lean/Meta.c ./Lean/Meta/AbstractMVars.c ./Lean/Meta/AbstractNestedProofs.c ./Lean/Meta/AppBuilder.c ./Lean/Meta/Basic.c ./Lean/Meta/Check.c ./Lean/Meta/Closure.c ./Lean/Meta/CollectMVars.c ./Lean/Meta/DiscrTree.c ./Lean/Meta/DiscrTreeTypes.c ./Lean/Meta/ExprDefEq.c ./Lean/Meta/ForEachExpr.c ./Lean/Meta/FunInfo.c ./Lean/Meta/GeneralizeTelescope.c ./Lean/Meta/GetConst.c ./Lean/Meta/Inductive.c ./Lean/Meta/InferType.c ./Lean/Meta/Instances.c ./Lean/Meta/KAbstract.c ./Lean/Meta/LevelDefEq.c ./Lean/Meta/Match.c ./Lean/Meta/Match/Basic.c ./Lean/Meta/Match/CaseArraySizes.c ./Lean/Meta/Match/CaseValues.c ./Lean/Meta/Match/MVarRenaming.c ./Lean/Meta/Match/Match.c ./Lean/Meta/Match/MatchPatternAttr.c ./Lean/Meta/Match/MatcherInfo.c ./Lean/Meta/MatchUtil.c ./Lean/Meta/Offset.c ./Lean/Meta/PPGoal.c ./Lean/Meta/RecursorInfo.c ./Lean/Meta/Reduce.c ./Lean/Meta/ReduceEval.c ./Lean/Meta/SynthInstance.c ./Lean/Meta/Tactic.c ./Lean/Meta/Tactic/Apply.c ./Lean/Meta/Tactic/Assert.c ./Lean/Meta/Tactic/Assumption.c ./Lean/Meta/Tactic/Cases.c ./Lean/Meta/Tactic/Clear.c ./Lean/Meta/Tactic/Constructor.c ./Lean/Meta/Tactic/Delta.c ./Lean/Meta/Tactic/ElimInfo.c ./Lean/Meta/Tactic/FVarSubst.c ./Lean/Meta/Tactic/Generalize.c ./Lean/Meta/Tactic/Induction.c ./Lean/Meta/Tactic/Injection.c ./Lean/Meta/Tactic/Intro.c ./Lean/Meta/Tactic/Replace.c ./Lean/Meta/Tactic/Revert.c ./Lean/Meta/Tactic/Rewrite.c ./Lean/Meta/Tactic/Simp.c ./Lean/Meta/Tactic/Simp/Main.c ./Lean/Meta/Tactic/Simp/Rewrite.c ./Lean/Meta/Tactic/Simp/SimpLemmas.c ./Lean/Meta/Tactic/Simp/Types.c ./Lean/Meta/Tactic/Subst.c ./Lean/Meta/Tactic/Util.c ./Lean/Meta/Transform.c ./Lean/Meta/TransparencyMode.c ./Lean/Meta/UnificationHint.c ./Lean/Meta/WHNF.c ./Lean/MetavarContext.c ./Lean/Modifiers.c ./Lean/MonadEnv.c ./Lean/Parser.c ./Lean/Parser/Attr.c ./Lean/Parser/Basic.c ./Lean/Parser/Command.c ./Lean/Parser/Do.c ./Lean/Parser/Extension.c ./Lean/Parser/Extra.c ./Lean/Parser/Level.c ./Lean/Parser/Module.c ./Lean/Parser/StrInterpolation.c ./Lean/Parser/Syntax.c ./Lean/Parser/Tactic.c ./Lean/Parser/Term.c ./Lean/Parser/Transform.c ./Lean/ParserCompiler.c ./Lean/ParserCompiler/Attribute.c ./Lean/PrettyPrinter.c ./Lean/PrettyPrinter/Basic.c ./Lean/PrettyPrinter/Delaborator.c ./Lean/PrettyPrinter/Delaborator/Basic.c ./Lean/PrettyPrinter/Delaborator/Builtins.c ./Lean/PrettyPrinter/Formatter.c ./Lean/PrettyPrinter/Parenthesizer.c ./Lean/ProjFns.c ./Lean/ReducibilityAttrs.c ./Lean/ResolveName.c ./Lean/Runtime.c ./Lean/ScopedEnvExtension.c ./Lean/Server.c ./Lean/Server/AsyncList.c ./Lean/Server/FileSource.c ./Lean/Server/FileWorker.c ./Lean/Server/InfoUtils.c ./Lean/Server/Snapshots.c ./Lean/Server/Utils.c ./Lean/Server/Watchdog.c ./Lean/Structure.c ./Lean/Syntax.c ./Lean/ToExpr.c ./Lean/Util.c ./Lean/Util/CollectFVars.c ./Lean/Util/CollectLevelParams.c ./Lean/Util/CollectMVars.c ./Lean/Util/Constructions.c ./Lean/Util/FindExpr.c ./Lean/Util/FindMVar.c ./Lean/Util/FoldConsts.c ./Lean/Util/ForEachExpr.c ./Lean/Util/MonadCache.c ./Lean/Util/PPExt.c ./Lean/Util/Path.c ./Lean/Util/Profile.c ./Lean/Util/RecDepth.c ./Lean/Util/Recognizers.c ./Lean/Util/ReplaceExpr.c ./Lean/Util/ReplaceLevel.c ./Lean/Util/SCC.c ./Lean/Util/Sorry.c ./Lean/Util/Trace.c ./Leanpkg.c ./Leanpkg/Git.c ./Leanpkg/LeanVersion.c ./Leanpkg/Manifest.c ./Leanpkg/Proc.c ./Leanpkg/Resolve.c ./Leanpkg/Toml.c ./Std.c ./Std/Data.c ./Std/Data/AssocList.c ./Std/Data/BinomialHeap.c ./Std/Data/DList.c ./Std/Data/HashMap.c ./Std/Data/HashSet.c ./Std/Data/PersistentArray.c ./Std/Data/PersistentHashMap.c ./Std/Data/PersistentHashSet.c ./Std/Data/Queue.c ./Std/Data/RBMap.c ./Std/Data/RBTree.c ./Std/Data/Stack.c ./Std/ShareCommon.c ) diff --git a/stage0/stdlib/Lean/Data/Lsp/Capabilities.c b/stage0/stdlib/Lean/Data/Lsp/Capabilities.c index 3a77433686..97f2dc6a3d 100644 --- a/stage0/stdlib/Lean/Data/Lsp/Capabilities.c +++ b/stage0/stdlib/Lean/Data/Lsp/Capabilities.c @@ -13,37 +13,43 @@ #ifdef __cplusplus extern "C" { #endif -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__3; -lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____spec__1(lean_object*, lean_object*); extern lean_object* l_Lean_instFromJsonOption___rarg___closed__1; +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108____boxed(lean_object*); +uint8_t l_Lean_Lsp_ServerCapabilities_declarationProvider___default; +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__5; uint8_t l_Lean_Lsp_ServerCapabilities_documentSymbolProvider___default; -lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75____spec__1(lean_object*, lean_object*); +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__3; lean_object* l_Lean_Lsp_instFromJsonServerCapabilities; lean_object* l_Lean_Lsp_ClientCapabilities_hasToJson(lean_object*); uint8_t l_Lean_Lsp_ServerCapabilities_hoverProvider___default; lean_object* l_List_join___rarg(lean_object*); -lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75____spec__1___boxed(lean_object*, lean_object*); +uint8_t l_Lean_Lsp_ServerCapabilities_typeDefinitionProvider___default; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_478_(lean_object*); -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75____boxed(lean_object*); +lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_ClientCapabilities_hasToJson___closed__1; lean_object* l_Lean_Lsp_ClientCapabilities_hasToJson___boxed(lean_object*); lean_object* l_Lean_Lsp_instFromJsonClientCapabilities(lean_object*); lean_object* l_Lean_Lsp_instToJsonServerCapabilities; -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75_(lean_object*); +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108_(lean_object*); lean_object* l_Lean_Lsp_instToJsonServerCapabilities___closed__1; +lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108____spec__1(lean_object*, lean_object*); +uint8_t l_Lean_Lsp_ServerCapabilities_definitionProvider___default; +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__4; lean_object* l_Lean_Lsp_ServerCapabilities_textDocumentSync_x3f___default; lean_object* l_Lean_Lsp_instFromJsonServerCapabilities___closed__1; lean_object* l_Lean_Json_getObjValD(lean_object*, lean_object*); -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____boxed(lean_object*); -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__2; +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__1; +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____boxed(lean_object*); +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__2; lean_object* l_Lean_Json_mkObj(lean_object*); -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__1; -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37_(lean_object*); +lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____spec__1___boxed(lean_object*, lean_object*); +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43_(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_534_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonClientCapabilities___closed__1; lean_object* l_Lean_Lsp_instFromJsonClientCapabilities___boxed(lean_object*); -lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____spec__1___boxed(lean_object*, lean_object*); +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__6; static lean_object* _init_l_Lean_Lsp_instFromJsonClientCapabilities___closed__1() { _start: { @@ -121,7 +127,31 @@ x_1 = 0; return x_1; } } -lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____spec__1(lean_object* x_1, lean_object* x_2) { +static uint8_t _init_l_Lean_Lsp_ServerCapabilities_definitionProvider___default() { +_start: +{ +uint8_t x_1; +x_1 = 0; +return x_1; +} +} +static uint8_t _init_l_Lean_Lsp_ServerCapabilities_declarationProvider___default() { +_start: +{ +uint8_t x_1; +x_1 = 0; +return x_1; +} +} +static uint8_t _init_l_Lean_Lsp_ServerCapabilities_typeDefinitionProvider___default() { +_start: +{ +uint8_t x_1; +x_1 = 0; +return x_1; +} +} +lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____spec__1(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -147,7 +177,7 @@ return x_8; } } } -static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__1() { +static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__1() { _start: { lean_object* x_1; @@ -155,7 +185,7 @@ x_1 = lean_mk_string("textDocumentSync"); return x_1; } } -static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__2() { +static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__2() { _start: { lean_object* x_1; @@ -163,7 +193,7 @@ x_1 = lean_mk_string("hoverProvider"); return x_1; } } -static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__3() { +static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__3() { _start: { lean_object* x_1; @@ -171,17 +201,41 @@ x_1 = lean_mk_string("documentSymbolProvider"); return x_1; } } -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37_(lean_object* x_1) { +static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__4() { _start: { -lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_1; +x_1 = lean_mk_string("definitionProvider"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("declarationProvider"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__6() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("typeDefinitionProvider"); +return x_1; +} +} +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43_(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; 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; 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_2 = lean_ctor_get(x_1, 0); -x_3 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__1; -x_4 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____spec__1(x_3, x_2); +x_3 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__1; +x_4 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____spec__1(x_3, x_2); x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*1); x_6 = lean_alloc_ctor(1, 0, 1); lean_ctor_set_uint8(x_6, 0, x_5); -x_7 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__2; +x_7 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__2; x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_6); @@ -192,41 +246,80 @@ lean_ctor_set(x_10, 1, x_9); x_11 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 1); x_12 = lean_alloc_ctor(1, 0, 1); lean_ctor_set_uint8(x_12, 0, x_11); -x_13 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__3; +x_13 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__3; x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); x_15 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_9); -x_16 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_16, 0, x_15); -lean_ctor_set(x_16, 1, x_9); -x_17 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_17, 0, x_10); -lean_ctor_set(x_17, 1, x_16); -x_18 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_18, 0, x_4); -lean_ctor_set(x_18, 1, x_17); -x_19 = l_List_join___rarg(x_18); -x_20 = l_Lean_Json_mkObj(x_19); -return x_20; +x_16 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 2); +x_17 = lean_alloc_ctor(1, 0, 1); +lean_ctor_set_uint8(x_17, 0, x_16); +x_18 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__4; +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_17); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_9); +x_21 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 3); +x_22 = lean_alloc_ctor(1, 0, 1); +lean_ctor_set_uint8(x_22, 0, x_21); +x_23 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__5; +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_22); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_9); +x_26 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 4); +x_27 = lean_alloc_ctor(1, 0, 1); +lean_ctor_set_uint8(x_27, 0, x_26); +x_28 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__6; +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_27); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_9); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_9); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_25); +lean_ctor_set(x_32, 1, x_31); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_20); +lean_ctor_set(x_33, 1, x_32); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_15); +lean_ctor_set(x_34, 1, x_33); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_10); +lean_ctor_set(x_35, 1, x_34); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_4); +lean_ctor_set(x_36, 1, x_35); +x_37 = l_List_join___rarg(x_36); +x_38 = l_Lean_Json_mkObj(x_37); +return x_38; } } -lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____spec__1___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____spec__1(x_1, x_2); +x_3 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____spec__1(x_1, x_2); lean_dec(x_2); return x_3; } } -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____boxed(lean_object* x_1) { +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37_(x_1); +x_2 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43_(x_1); lean_dec(x_1); return x_2; } @@ -235,7 +328,7 @@ static lean_object* _init_l_Lean_Lsp_instToJsonServerCapabilities___closed__1() _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____boxed), 1, 0); +x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____boxed), 1, 0); return x_1; } } @@ -247,7 +340,7 @@ x_1 = l_Lean_Lsp_instToJsonServerCapabilities___closed__1; return x_1; } } -lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75____spec__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; @@ -296,12 +389,12 @@ return x_11; } } } -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75_(lean_object* x_1) { +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__1; -x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75____spec__1(x_1, x_2); +x_2 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__1; +x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; @@ -314,7 +407,7 @@ lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); -x_6 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__2; +x_6 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__2; x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_6); if (lean_obj_tag(x_7) == 0) { @@ -329,7 +422,7 @@ lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); lean_dec(x_7); -x_10 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__3; +x_10 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__3; x_11 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_10); if (lean_obj_tag(x_11) == 0) { @@ -341,61 +434,136 @@ return x_12; } else { -uint8_t x_13; -x_13 = !lean_is_exclusive(x_11); -if (x_13 == 0) +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_11, 0); +lean_inc(x_13); +lean_dec(x_11); +x_14 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__4; +x_15 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_14); +if (lean_obj_tag(x_15) == 0) { -lean_object* x_14; lean_object* x_15; uint8_t x_16; uint8_t x_17; -x_14 = lean_ctor_get(x_11, 0); -x_15 = lean_alloc_ctor(0, 1, 2); -lean_ctor_set(x_15, 0, x_5); -x_16 = lean_unbox(x_9); +lean_object* x_16; +lean_dec(x_13); lean_dec(x_9); -lean_ctor_set_uint8(x_15, sizeof(void*)*1, x_16); -x_17 = lean_unbox(x_14); -lean_dec(x_14); -lean_ctor_set_uint8(x_15, sizeof(void*)*1 + 1, x_17); -lean_ctor_set(x_11, 0, x_15); -return x_11; +lean_dec(x_5); +x_16 = lean_box(0); +return x_16; } else { -lean_object* x_18; lean_object* x_19; uint8_t x_20; uint8_t x_21; lean_object* x_22; -x_18 = lean_ctor_get(x_11, 0); -lean_inc(x_18); -lean_dec(x_11); -x_19 = lean_alloc_ctor(0, 1, 2); -lean_ctor_set(x_19, 0, x_5); -x_20 = lean_unbox(x_9); +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_15, 0); +lean_inc(x_17); +lean_dec(x_15); +x_18 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__5; +x_19 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_18); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; +lean_dec(x_17); +lean_dec(x_13); lean_dec(x_9); -lean_ctor_set_uint8(x_19, sizeof(void*)*1, x_20); -x_21 = lean_unbox(x_18); -lean_dec(x_18); -lean_ctor_set_uint8(x_19, sizeof(void*)*1 + 1, x_21); -x_22 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_22, 0, x_19); -return x_22; +lean_dec(x_5); +x_20 = lean_box(0); +return x_20; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_19, 0); +lean_inc(x_21); +lean_dec(x_19); +x_22 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__6; +x_23 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; +lean_dec(x_21); +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_9); +lean_dec(x_5); +x_24 = lean_box(0); +return x_24; +} +else +{ +uint8_t x_25; +x_25 = !lean_is_exclusive(x_23); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; uint8_t x_28; uint8_t x_29; uint8_t x_30; uint8_t x_31; uint8_t x_32; +x_26 = lean_ctor_get(x_23, 0); +x_27 = lean_alloc_ctor(0, 1, 5); +lean_ctor_set(x_27, 0, x_5); +x_28 = lean_unbox(x_9); +lean_dec(x_9); +lean_ctor_set_uint8(x_27, sizeof(void*)*1, x_28); +x_29 = lean_unbox(x_13); +lean_dec(x_13); +lean_ctor_set_uint8(x_27, sizeof(void*)*1 + 1, x_29); +x_30 = lean_unbox(x_17); +lean_dec(x_17); +lean_ctor_set_uint8(x_27, sizeof(void*)*1 + 2, x_30); +x_31 = lean_unbox(x_21); +lean_dec(x_21); +lean_ctor_set_uint8(x_27, sizeof(void*)*1 + 3, x_31); +x_32 = lean_unbox(x_26); +lean_dec(x_26); +lean_ctor_set_uint8(x_27, sizeof(void*)*1 + 4, x_32); +lean_ctor_set(x_23, 0, x_27); +return x_23; +} +else +{ +lean_object* x_33; lean_object* x_34; uint8_t x_35; uint8_t x_36; uint8_t x_37; uint8_t x_38; uint8_t x_39; lean_object* x_40; +x_33 = lean_ctor_get(x_23, 0); +lean_inc(x_33); +lean_dec(x_23); +x_34 = lean_alloc_ctor(0, 1, 5); +lean_ctor_set(x_34, 0, x_5); +x_35 = lean_unbox(x_9); +lean_dec(x_9); +lean_ctor_set_uint8(x_34, sizeof(void*)*1, x_35); +x_36 = lean_unbox(x_13); +lean_dec(x_13); +lean_ctor_set_uint8(x_34, sizeof(void*)*1 + 1, x_36); +x_37 = lean_unbox(x_17); +lean_dec(x_17); +lean_ctor_set_uint8(x_34, sizeof(void*)*1 + 2, x_37); +x_38 = lean_unbox(x_21); +lean_dec(x_21); +lean_ctor_set_uint8(x_34, sizeof(void*)*1 + 3, x_38); +x_39 = lean_unbox(x_33); +lean_dec(x_33); +lean_ctor_set_uint8(x_34, sizeof(void*)*1 + 4, x_39); +x_40 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_40, 0, x_34); +return x_40; } } } } } } -lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75____spec__1___boxed(lean_object* x_1, lean_object* x_2) { +} +} +} +lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75____spec__1(x_1, x_2); +x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75____boxed(lean_object* x_1) { +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108____boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75_(x_1); +x_2 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108_(x_1); lean_dec(x_1); return x_2; } @@ -404,7 +572,7 @@ static lean_object* _init_l_Lean_Lsp_instFromJsonServerCapabilities___closed__1( _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75____boxed), 1, 0); +x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108____boxed), 1, 0); return x_1; } } @@ -441,12 +609,21 @@ l_Lean_Lsp_ServerCapabilities_textDocumentSync_x3f___default = _init_l_Lean_Lsp_ lean_mark_persistent(l_Lean_Lsp_ServerCapabilities_textDocumentSync_x3f___default); l_Lean_Lsp_ServerCapabilities_hoverProvider___default = _init_l_Lean_Lsp_ServerCapabilities_hoverProvider___default(); l_Lean_Lsp_ServerCapabilities_documentSymbolProvider___default = _init_l_Lean_Lsp_ServerCapabilities_documentSymbolProvider___default(); -l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__1 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__1(); -lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__1); -l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__2 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__2(); -lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__2); -l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__3 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__3(); -lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37____closed__3); +l_Lean_Lsp_ServerCapabilities_definitionProvider___default = _init_l_Lean_Lsp_ServerCapabilities_definitionProvider___default(); +l_Lean_Lsp_ServerCapabilities_declarationProvider___default = _init_l_Lean_Lsp_ServerCapabilities_declarationProvider___default(); +l_Lean_Lsp_ServerCapabilities_typeDefinitionProvider___default = _init_l_Lean_Lsp_ServerCapabilities_typeDefinitionProvider___default(); +l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__1 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__1(); +lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__1); +l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__2 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__2(); +lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__2); +l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__3 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__3(); +lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__3); +l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__4 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__4(); +lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__4); +l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__5 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__5(); +lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__5); +l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__6 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__6(); +lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43____closed__6); l_Lean_Lsp_instToJsonServerCapabilities___closed__1 = _init_l_Lean_Lsp_instToJsonServerCapabilities___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonServerCapabilities___closed__1); l_Lean_Lsp_instToJsonServerCapabilities = _init_l_Lean_Lsp_instToJsonServerCapabilities(); diff --git a/stage0/stdlib/Lean/Data/Lsp/InitShutdown.c b/stage0/stdlib/Lean/Data/Lsp/InitShutdown.c index 438d6df522..a2befb9502 100644 --- a/stage0/stdlib/Lean/Data/Lsp/InitShutdown.c +++ b/stage0/stdlib/Lean/Data/Lsp/InitShutdown.c @@ -88,7 +88,7 @@ lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializePar lean_object* l_Lean_Lsp_instToJsonInitializedParams(lean_object*); lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonInitializeResult; -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75_(lean_object*); +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108_(lean_object*); lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__14; lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonServerInfo____x40_Lean_Data_Lsp_InitShutdown___hyg_316_(lean_object*); lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__5; @@ -121,7 +121,7 @@ lean_object* l_Lean_Lsp_instToJsonInitializeParams___closed__1; lean_object* l_Lean_Lsp_instFromJsonServerInfo; lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__1; lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____spec__2___boxed(lean_object*, lean_object*); -lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37_(lean_object*); +lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43_(lean_object*); lean_object* l_Lean_Lsp_InitializeParams_rootUri_x3f___default; lean_object* l_Lean_Lsp_InitializeParams_initializationOptions_x3f___default; lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__2; @@ -1650,7 +1650,7 @@ _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_2 = lean_ctor_get(x_1, 0); -x_3 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_37_(x_2); +x_3 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_43_(x_2); x_4 = l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__5; x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); @@ -1712,7 +1712,7 @@ _start: { lean_object* x_3; lean_object* x_4; x_3 = l_Lean_Json_getObjValD(x_1, x_2); -x_4 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_75_(x_3); +x_4 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_108_(x_3); lean_dec(x_3); return x_4; } diff --git a/stage0/stdlib/Lean/Data/Lsp/LanguageFeatures.c b/stage0/stdlib/Lean/Data/Lsp/LanguageFeatures.c index e8c469440c..c465c59c5c 100644 --- a/stage0/stdlib/Lean/Data/Lsp/LanguageFeatures.c +++ b/stage0/stdlib/Lean/Data/Lsp/LanguageFeatures.c @@ -20,15 +20,16 @@ lean_object* l_Lean_Lsp_instToJsonHoverParams(lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__61; +lean_object* l_Lean_Lsp_instFromJsonDefinitionParams___boxed(lean_object*); +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__1; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__75; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__2___rarg(lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__26; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__58; lean_object* l_Lean_Lsp_instFromJsonHoverParams___boxed(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299____spec__1(lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonMarkupContent____x40_Lean_Data_Lsp_Basic___hyg_1626____closed__2; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125____boxed(lean_object*); +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__4; lean_object* l_Lean_Lsp_DocumentSymbolAux_children_x3f___default(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocationLink____x40_Lean_Data_Lsp_Basic___hyg_631____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDocumentSymbolAux___rarg(lean_object*); @@ -36,6 +37,9 @@ lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__12; lean_object* l_Lean_Lsp_instToJsonDocumentSymbol; lean_object* l_Lean_Lsp_instToJsonSymbolKind_match__1(lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* l_Lean_Lsp_instFromJsonDeclarationParams(lean_object*); +lean_object* l_Lean_Lsp_instToJsonDefinitionParams(lean_object*); +lean_object* l_Lean_Lsp_instFromJsonDefinitionParams(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__71; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__7; lean_object* l_Lean_Json_opt___at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__2(lean_object*, lean_object*); @@ -43,15 +47,17 @@ lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__42; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__53; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__37; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__55; +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind_match__1___rarg___boxed(lean_object**); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__3; +lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_join___rarg(lean_object*); uint8_t l_USize_decLt(size_t, size_t); lean_object* l_Lean_Lsp_instToJsonHover___closed__1; lean_object* l_Lean_Lsp_instToJsonDocumentSymbolParams; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__14; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__28; -lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__1(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__5; extern lean_object* l_Int_Int_pow___closed__1; lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonHover____x40_Lean_Data_Lsp_LanguageFeatures___hyg_11____closed__1; @@ -77,51 +83,51 @@ lean_object* l_Lean_Lsp_instToJsonSymbolKind_match__1___rarg(uint8_t, lean_objec lean_object* l_Array_mapMUnsafe_map___at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__49; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__50; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg(lean_object*, lean_object*); +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__2; +lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__6; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__34; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__48; lean_object* l_Lean_Lsp_instToJsonSymbolKind(uint8_t); lean_object* l_Lean_Lsp_instFromJsonDocumentSymbolParams; -lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__2(lean_object*); +lean_object* l_Lean_Lsp_instFromJsonTypeDefinitionParams(lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1265_(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__72; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__1(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__23; lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocationLink____x40_Lean_Data_Lsp_Basic___hyg_584____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDocumentSymbol_go_match__1(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__13; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__41; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259_(lean_object*); +lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__1(lean_object*); +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373_(lean_object*); +lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__2___rarg(lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_Lsp_instToJsonDocumentSymbolAux(lean_object*); -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125_(lean_object*); -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__4; +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239_(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__38; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__21; lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonHover____x40_Lean_Data_Lsp_LanguageFeatures___hyg_40____boxed(lean_object*); +lean_object* l_Lean_Lsp_instToJsonDeclarationParams(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__22; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__1; size_t lean_usize_of_nat(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_499____closed__2; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__62; extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1053____closed__1; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__54; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__2; lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_915_(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__33; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__25; +lean_object* l_Lean_Lsp_instFromJsonDeclarationParams___boxed(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__29; lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonMarkupContent____x40_Lean_Data_Lsp_Basic___hyg_1660_(lean_object*); lean_object* l_Lean_Lsp_DocumentSymbolAux_detail_x3f___default; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__52; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__46; -lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__1(lean_object*); -lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValD(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonHoverParams(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__65; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__70; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__35; +lean_object* l_Lean_Lsp_instFromJsonTypeDefinitionParams___boxed(lean_object*); lean_object* l_Lean_Lsp_instToJsonHover; lean_object* l_Lean_Lsp_instToJsonDocumentSymbol_go(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__36; @@ -139,6 +145,7 @@ lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__74; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__60; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__47; extern lean_object* l_Lean_JsonNumber_toString___closed__1; +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239____boxed(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__44; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonHover____x40_Lean_Data_Lsp_LanguageFeatures___hyg_40____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__1; @@ -147,21 +154,23 @@ lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonHove lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__57; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__17; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__8; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_155_(lean_object*); +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_269_(lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonHover; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__45; lean_object* l_Lean_Lsp_instFromJsonHover___closed__1; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__3; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__67; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__9; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__40; +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__3; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__27; lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__4; lean_object* l_Lean_Lsp_instToJsonDocumentSymbolParams___closed__1; +lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__2(lean_object*); lean_object* l_Lean_Lsp_instToJsonSymbolKind___closed__68; lean_object* l_Lean_Lsp_instToJsonDocumentSymbolResult(lean_object*); +lean_object* l_Lean_Lsp_instToJsonTypeDefinitionParams(lean_object*); lean_object* l_Lean_Lsp_instFromJsonDocumentSymbolParams___closed__1; lean_object* lean_nat_to_int(lean_object*); lean_object* l_Lean_Lsp_instToJsonDocumentSymbol_go_match__1___rarg(lean_object*, lean_object*); @@ -382,7 +391,154 @@ x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionPara return x_2; } } -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125_(lean_object* x_1) { +lean_object* l_Lean_Lsp_instFromJsonDeclarationParams(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(x_1); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_3; +x_3 = lean_box(0); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +return x_2; +} +else +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_2, 0); +lean_inc(x_5); +lean_dec(x_2); +x_6 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_6, 0, x_5); +return x_6; +} +} +} +} +lean_object* l_Lean_Lsp_instFromJsonDeclarationParams___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Lsp_instFromJsonDeclarationParams(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Lsp_instToJsonDeclarationParams(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1265_(x_1); +return x_2; +} +} +lean_object* l_Lean_Lsp_instFromJsonDefinitionParams(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(x_1); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_3; +x_3 = lean_box(0); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +return x_2; +} +else +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_2, 0); +lean_inc(x_5); +lean_dec(x_2); +x_6 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_6, 0, x_5); +return x_6; +} +} +} +} +lean_object* l_Lean_Lsp_instFromJsonDefinitionParams___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Lsp_instFromJsonDefinitionParams(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Lsp_instToJsonDefinitionParams(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1265_(x_1); +return x_2; +} +} +lean_object* l_Lean_Lsp_instFromJsonTypeDefinitionParams(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(x_1); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_3; +x_3 = lean_box(0); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +return x_2; +} +else +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_2, 0); +lean_inc(x_5); +lean_dec(x_2); +x_6 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_6, 0, x_5); +return x_6; +} +} +} +} +lean_object* l_Lean_Lsp_instFromJsonTypeDefinitionParams___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Lsp_instFromJsonTypeDefinitionParams(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Lsp_instToJsonTypeDefinitionParams(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1265_(x_1); +return x_2; +} +} +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -415,11 +571,11 @@ return x_7; } } } -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125____boxed(lean_object* x_1) { +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239____boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125_(x_1); +x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239_(x_1); lean_dec(x_1); return x_2; } @@ -428,7 +584,7 @@ static lean_object* _init_l_Lean_Lsp_instFromJsonDocumentSymbolParams___closed__ _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125____boxed), 1, 0); +x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239____boxed), 1, 0); return x_1; } } @@ -440,7 +596,7 @@ x_1 = l_Lean_Lsp_instFromJsonDocumentSymbolParams___closed__1; return x_1; } } -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_155_(lean_object* x_1) { +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_269_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; @@ -465,7 +621,7 @@ static lean_object* _init_l_Lean_Lsp_instToJsonDocumentSymbolParams___closed__1( _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_155_), 1, 0); +x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_269_), 1, 0); return x_1; } } @@ -2338,7 +2494,7 @@ x_2 = lean_box(0); return x_2; } } -lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__2___rarg(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { +lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__2___rarg(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { _start: { uint8_t x_5; @@ -2369,15 +2525,15 @@ goto _start; } } } -lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__2(lean_object* x_1) { +lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__2(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__2___rarg___boxed), 4, 0); +x_2 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__2___rarg___boxed), 4, 0); return x_2; } } -lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_3) == 0) @@ -2399,7 +2555,7 @@ x_7 = lean_usize_of_nat(x_6); lean_dec(x_6); x_8 = 0; x_9 = x_5; -x_10 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__2___rarg(x_1, x_7, x_8, x_9); +x_10 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__2___rarg(x_1, x_7, x_8, x_9); x_11 = x_10; x_12 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_12, 0, x_11); @@ -2414,15 +2570,15 @@ return x_15; } } } -lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__1(lean_object* x_1) { +lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__1___rarg), 3, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__1___rarg), 3, 0); return x_2; } } -static lean_object* _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__1() { +static lean_object* _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__1() { _start: { lean_object* x_1; @@ -2430,7 +2586,7 @@ x_1 = lean_mk_string("name"); return x_1; } } -static lean_object* _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__2() { +static lean_object* _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__2() { _start: { lean_object* x_1; @@ -2438,7 +2594,7 @@ x_1 = lean_mk_string("detail"); return x_1; } } -static lean_object* _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__3() { +static lean_object* _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__3() { _start: { lean_object* x_1; @@ -2446,7 +2602,7 @@ x_1 = lean_mk_string("selectionRange"); return x_1; } } -static lean_object* _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__4() { +static lean_object* _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__4() { _start: { lean_object* x_1; @@ -2454,7 +2610,7 @@ x_1 = lean_mk_string("children"); return x_1; } } -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; @@ -2472,7 +2628,7 @@ lean_inc(x_8); lean_dec(x_2); x_9 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_9, 0, x_3); -x_10 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__1; +x_10 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__1; x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); @@ -2480,7 +2636,7 @@ x_12 = lean_box(0); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); -x_14 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__2; +x_14 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__2; x_15 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonDocumentFilter____x40_Lean_Data_Lsp_Basic___hyg_1354____spec__1(x_14, x_4); lean_dec(x_4); x_16 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353_(x_6); @@ -2492,15 +2648,15 @@ x_19 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_12); x_20 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353_(x_7); -x_21 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__3; +x_21 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__3; x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_20); x_23 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_12); -x_24 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__4; -x_25 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__1___rarg(x_1, x_24, x_8); +x_24 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__4; +x_25 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__1___rarg(x_1, x_24, x_8); x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_12); @@ -2719,15 +2875,15 @@ return x_37; } } } -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259_(lean_object* x_1) { +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373_(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg), 2, 0); +x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg), 2, 0); return x_2; } } -lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { size_t x_5; size_t x_6; lean_object* x_7; @@ -2735,7 +2891,7 @@ x_5 = lean_unbox_usize(x_2); lean_dec(x_2); x_6 = lean_unbox_usize(x_3); lean_dec(x_3); -x_7 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____spec__2___rarg(x_1, x_5, x_6, x_4); +x_7 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____spec__2___rarg(x_1, x_5, x_6, x_4); return x_7; } } @@ -2743,7 +2899,7 @@ lean_object* l_Lean_Lsp_instToJsonDocumentSymbolAux___rarg(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg), 2, 1); +x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg), 2, 1); lean_closure_set(x_2, 0, x_1); return x_2; } @@ -2790,7 +2946,7 @@ x_6 = lean_array_uget(x_3, x_2); x_7 = lean_unsigned_to_nat(0u); x_8 = lean_array_uset(x_3, x_2, x_7); x_9 = x_6; -x_10 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__1(x_9); +x_10 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__1(x_9); x_11 = 1; x_12 = x_2 + x_11; x_13 = x_10; @@ -2837,7 +2993,7 @@ return x_14; } } } -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__1(lean_object* x_1) { +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__1(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; uint8_t 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; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; @@ -2855,7 +3011,7 @@ lean_inc(x_7); lean_dec(x_1); x_8 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_8, 0, x_2); -x_9 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__1; +x_9 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__1; x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); @@ -2863,7 +3019,7 @@ x_11 = lean_box(0); x_12 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); -x_13 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__2; +x_13 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__2; x_14 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonDocumentFilter____x40_Lean_Data_Lsp_Basic___hyg_1354____spec__1(x_13, x_3); lean_dec(x_3); x_15 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353_(x_5); @@ -2875,14 +3031,14 @@ x_18 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_11); x_19 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353_(x_6); -x_20 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__3; +x_20 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__3; x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_19); x_22 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_11); -x_23 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__4; +x_23 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__4; x_24 = l_Lean_Json_opt___at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__2(x_23, x_7); x_25 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_25, 0, x_24); @@ -3106,7 +3262,7 @@ lean_object* l_Lean_Lsp_instToJsonDocumentSymbol_go(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__1(x_1); +x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__1(x_1); return x_2; } } @@ -3345,14 +3501,14 @@ l_Lean_Lsp_instToJsonSymbolKind___closed__76 = _init_l_Lean_Lsp_instToJsonSymbol lean_mark_persistent(l_Lean_Lsp_instToJsonSymbolKind___closed__76); l_Lean_Lsp_DocumentSymbolAux_detail_x3f___default = _init_l_Lean_Lsp_DocumentSymbolAux_detail_x3f___default(); lean_mark_persistent(l_Lean_Lsp_DocumentSymbolAux_detail_x3f___default); -l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__1 = _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__1(); -lean_mark_persistent(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__1); -l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__2 = _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__2(); -lean_mark_persistent(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__2); -l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__3 = _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__3(); -lean_mark_persistent(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__3); -l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__4 = _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__4(); -lean_mark_persistent(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_259____rarg___closed__4); +l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__1 = _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__1(); +lean_mark_persistent(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__1); +l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__2 = _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__2(); +lean_mark_persistent(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__2); +l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__3 = _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__3(); +lean_mark_persistent(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__3); +l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__4 = _init_l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__4(); +lean_mark_persistent(l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolAux____x40_Lean_Data_Lsp_LanguageFeatures___hyg_373____rarg___closed__4); l_Lean_Lsp_instToJsonDocumentSymbol___closed__1 = _init_l_Lean_Lsp_instToJsonDocumentSymbol___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonDocumentSymbol___closed__1); l_Lean_Lsp_instToJsonDocumentSymbol = _init_l_Lean_Lsp_instToJsonDocumentSymbol(); diff --git a/stage0/stdlib/Lean/DeclarationRange.c b/stage0/stdlib/Lean/DeclarationRange.c index ba899d6679..adf00c038d 100644 --- a/stage0/stdlib/Lean/DeclarationRange.c +++ b/stage0/stdlib/Lean/DeclarationRange.c @@ -13,11 +13,11 @@ #ifdef __cplusplus extern "C" { #endif -lean_object* l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MapDeclarationExtension_find_x3f___at_Lean_findDeclarationRangesCore_x3f___spec__1(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; extern lean_object* l_Lean_mkMapDeclarationExtension___rarg___closed__1; lean_object* l_Lean_addDeclarationRanges___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__5; size_t l_USize_add(size_t, size_t); extern lean_object* l_Lean_mkMapDeclarationExtension___rarg___closed__2; lean_object* lean_mk_empty_array_with_capacity(lean_object*); @@ -29,133 +29,141 @@ lean_object* lean_name_mk_string(lean_object*, lean_object*); uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_findDeclarationRanges_x3f___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__4(lean_object*, lean_object*); extern lean_object* l_Lean_noConfusionExt; lean_object* l_Lean_declRangeExt___elambda__2(lean_object*); uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__5; -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__3; extern lean_object* l_Lean_registerInternalExceptionId___closed__2; lean_object* l_Lean_addDeclarationRanges(lean_object*); lean_object* l_Lean_instReprDeclarationRanges___closed__1; extern lean_object* l_Array_empty___closed__1; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__6; lean_object* lean_st_ref_get(lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20__match__1(lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_declRangeExt___elambda__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_declRangeExt; +lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1___lambda__1(lean_object*); lean_object* lean_array_get_size(lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16__match__1(lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_instReprDeclarationRange; lean_object* l_Lean_declRangeExt___elambda__1___boxed(lean_object*); extern lean_object* l_instReprProd___rarg___closed__1; +uint8_t l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__6(lean_object*, lean_object*, size_t, size_t); lean_object* l_Lean_declRangeExt___closed__4; extern lean_object* l_Lean_auxRecExt; lean_object* l_Lean_declRangeExt___elambda__4(lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); extern lean_object* l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__4; lean_object* l_Lean_findDeclarationRanges_x3f___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__3; extern lean_object* l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__27; lean_object* l_Lean_findDeclarationRanges_x3f___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__2(lean_object*, lean_object*, lean_object*); lean_object* l_Array_binSearchAux___at_Lean_findDeclarationRangesCore_x3f___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_findDeclarationRangesCore_x3f___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addDeclarationRanges___rarg___lambda__1(lean_object*, lean_object*, lean_object*); -uint8_t l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16_(lean_object*, lean_object*); +uint8_t l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20_(lean_object*, lean_object*); lean_object* l_Lean_MapDeclarationExtension_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_declRangeExt___elambda__4___boxed(lean_object*, lean_object*); +lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172_(lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294_(lean_object*, lean_object*); lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__3(lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__7; +lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___boxed(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___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__5; -lean_object* l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___closed__1; uint8_t l_Lean_instDecidableEqDeclarationRange(lean_object*, lean_object*); lean_object* l_Lean_declRangeExt___elambda__1(lean_object*); -lean_object* l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__1; +lean_object* l_Nat_repr(lean_object*); extern lean_object* l_IO_instInhabitedError___closed__1; lean_object* l_Std_RBNode_find___at_Lean_findDeclarationRangesCore_x3f___spec__2(lean_object*, lean_object*); lean_object* l_Lean_findDeclarationRanges_x3f(lean_object*); lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___lambda__2(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__3; lean_object* l_Lean_instInhabitedDeclarationRanges___closed__1; -lean_object* l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__2; lean_object* l_Lean_findDeclarationRangesCore_x3f___rarg___lambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__10; lean_object* l_Lean_MapDeclarationExtension_find_x3f___at_Lean_findDeclarationRangesCore_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_persistentEnvExtensionsRef; -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____boxed(lean_object*, lean_object*); -lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1(lean_object*, lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__1; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__2; lean_object* l_Lean_instInhabitedDeclarationRange___closed__1; -lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___closed__1; extern lean_object* l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__25; -lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__4(lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__6; lean_object* l_Lean_declRangeExt___closed__1; size_t lean_usize_of_nat(lean_object*); -lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1___closed__1; +lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20____boxed(lean_object*, lean_object*); lean_object* l_Lean_findDeclarationRanges_x3f___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1___closed__1; lean_object* l_Lean_SimplePersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_Lean_findDeclarationRangesCore_x3f(lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16____boxed(lean_object*, lean_object*); lean_object* l_Array_binSearchAux___at_Lean_findDeclarationRangesCore_x3f___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; +lean_object* l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__1; lean_object* l_List_redLength___rarg(lean_object*); lean_object* l_Lean_instDecidableEqDeclarationRange___boxed(lean_object*, lean_object*); +lean_object* l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_declRangeExt___closed__2; lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__6(lean_object*, lean_object*, size_t, size_t); -lean_object* l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216_(lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20__match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__5(lean_object*, lean_object*); +lean_object* l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338_(lean_object*); +lean_object* l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__2; uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Std_RBNode_find___at_Lean_findDeclarationRangesCore_x3f___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_instReprDeclarationRanges; lean_object* l_Lean_declRangeExt___closed__5; lean_object* l_Lean_declRangeExt___closed__3; extern lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___closed__1; -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__4; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__3; extern lean_object* l_Lean_EnvExtensionInterfaceUnsafe_instInhabitedExt___closed__2; lean_object* l_Lean_declRangeExt___elambda__4___rarg(lean_object*); lean_object* l_Lean_isRec___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_instInhabitedDeclarationRanges; -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__6; -lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1___lambda__1(lean_object*); -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__5(lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__5; lean_object* l_Lean_Name_getPrefix(lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__4; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__4; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__8; extern lean_object* l_Lean_instInhabitedName; lean_object* l_Lean_Environment_getModuleIdxFor_x3f(lean_object*, lean_object*); lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____boxed(lean_object*, lean_object*); +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__1; lean_object* l_Lean_instInhabitedDeclarationRange; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__4; lean_object* l_Lean_declRangeExt___elambda__3(lean_object*, lean_object*); uint8_t l_Lean_TagDeclarationExtension_isTagged(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__2; extern lean_object* l_Lean_instInhabitedPosition___closed__1; -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115_(lean_object*, lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__2; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__9; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203_(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Position_0__Lean_reprPosition____x40_Lean_Data_Position___hyg_115_(lean_object*, lean_object*); lean_object* l_Lean_declRangeExt___elambda__2___boxed(lean_object*); -lean_object* l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__6; lean_object* l_Lean_findDeclarationRangesCore_x3f___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_instReprDeclarationRange___closed__1; -lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16__match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____boxed(lean_object*, lean_object*); -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__1; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__2; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__1; +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____boxed(lean_object*, lean_object*); extern lean_object* l_Array_qsort_sort___at_Lean_mkMapDeclarationExtension___spec__1___rarg___closed__1; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); static lean_object* _init_l_Lean_instInhabitedDeclarationRange___closed__1() { _start: { -lean_object* x_1; lean_object* x_2; +lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_instInhabitedPosition___closed__1; -x_2 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_2, 0, x_1); -lean_ctor_set(x_2, 1, x_1); -return x_2; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +lean_ctor_set(x_3, 2, x_1); +lean_ctor_set(x_3, 3, x_2); +return x_3; } } static lean_object* _init_l_Lean_instInhabitedDeclarationRange() { @@ -166,60 +174,94 @@ x_1 = l_Lean_instInhabitedDeclarationRange___closed__1; return x_1; } } -lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16__match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20__match__1___rarg(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_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_ctor_get(x_2, 0); +x_6 = lean_ctor_get(x_1, 2); lean_inc(x_6); -x_7 = lean_ctor_get(x_2, 1); +x_7 = lean_ctor_get(x_1, 3); lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_ctor_get(x_2, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_2, 1); +lean_inc(x_9); +x_10 = lean_ctor_get(x_2, 2); +lean_inc(x_10); +x_11 = lean_ctor_get(x_2, 3); +lean_inc(x_11); lean_dec(x_2); -x_8 = lean_apply_4(x_3, x_4, x_5, x_6, x_7); -return x_8; +x_12 = lean_apply_8(x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +return x_12; } } -lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16__match__1(lean_object* x_1) { +lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20__match__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16__match__1___rarg), 3, 0); +x_2 = lean_alloc_closure((void*)(l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20__match__1___rarg), 3, 0); return x_2; } } -uint8_t l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16_(lean_object* x_1, lean_object* x_2) { +uint8_t l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20_(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; x_3 = lean_ctor_get(x_1, 0); x_4 = lean_ctor_get(x_1, 1); -x_5 = lean_ctor_get(x_2, 0); -x_6 = lean_ctor_get(x_2, 1); -x_7 = l___private_Lean_Data_Position_0__Lean_decEqPosition____x40_Lean_Data_Position___hyg_16_(x_3, x_5); -if (x_7 == 0) +x_5 = lean_ctor_get(x_1, 2); +x_6 = lean_ctor_get(x_1, 3); +x_7 = lean_ctor_get(x_2, 0); +x_8 = lean_ctor_get(x_2, 1); +x_9 = lean_ctor_get(x_2, 2); +x_10 = lean_ctor_get(x_2, 3); +x_11 = l___private_Lean_Data_Position_0__Lean_decEqPosition____x40_Lean_Data_Position___hyg_16_(x_3, x_7); +if (x_11 == 0) { -uint8_t x_8; -x_8 = 0; -return x_8; +uint8_t x_12; +x_12 = 0; +return x_12; } else { -uint8_t x_9; -x_9 = l___private_Lean_Data_Position_0__Lean_decEqPosition____x40_Lean_Data_Position___hyg_16_(x_4, x_6); -return x_9; +uint8_t x_13; +x_13 = lean_nat_dec_eq(x_4, x_8); +if (x_13 == 0) +{ +uint8_t x_14; +x_14 = 0; +return x_14; +} +else +{ +uint8_t x_15; +x_15 = l___private_Lean_Data_Position_0__Lean_decEqPosition____x40_Lean_Data_Position___hyg_16_(x_5, x_9); +if (x_15 == 0) +{ +uint8_t x_16; +x_16 = 0; +return x_16; +} +else +{ +uint8_t x_17; +x_17 = lean_nat_dec_eq(x_6, x_10); +return x_17; } } } -lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16____boxed(lean_object* x_1, lean_object* x_2) { +} +} +lean_object* l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20____boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16_(x_1, x_2); +x_3 = l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20_(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); @@ -230,7 +272,7 @@ uint8_t l_Lean_instDecidableEqDeclarationRange(lean_object* x_1, lean_object* x_ _start: { uint8_t x_3; -x_3 = l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_16_(x_1, x_2); +x_3 = l___private_Lean_DeclarationRange_0__Lean_decEqDeclarationRange____x40_Lean_DeclarationRange___hyg_20_(x_1, x_2); return x_3; } } @@ -245,7 +287,7 @@ x_4 = lean_box(x_3); return x_4; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__1() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__1() { _start: { lean_object* x_1; @@ -253,33 +295,33 @@ x_1 = lean_mk_string("pos"); return x_1; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__2() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__1; +x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__3() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__2; +x_2 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__2; x_3 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__4() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__3; +x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__3; x_2 = l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__4; x_3 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_3, 0, x_1); @@ -287,7 +329,25 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__5() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("charUtf16"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__5; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__7() { _start: { lean_object* x_1; @@ -295,25 +355,43 @@ x_1 = lean_mk_string("endPos"); return x_1; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__6() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__8() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__5; +x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__7; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115_(lean_object* x_1, lean_object* x_2) { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__9() { _start: { -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; lean_object* x_26; +lean_object* x_1; +x_1 = lean_mk_string("endCharUtf16"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__9; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203_(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; lean_object* x_44; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_unsigned_to_nat(0u); x_5 = l___private_Lean_Data_Position_0__Lean_reprPosition____x40_Lean_Data_Position___hyg_115_(x_3, x_4); -x_6 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__4; +x_6 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__4; x_7 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); @@ -325,7 +403,7 @@ x_10 = lean_box(1); x_11 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_11, 0, x_9); lean_ctor_set(x_11, 1, x_10); -x_12 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__6; +x_12 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__6; x_13 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); @@ -335,35 +413,77 @@ lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_14); x_16 = lean_ctor_get(x_1, 1); lean_inc(x_16); -lean_dec(x_1); -x_17 = l___private_Lean_Data_Position_0__Lean_reprPosition____x40_Lean_Data_Position___hyg_115_(x_16, x_4); -x_18 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_18, 0, x_15); -lean_ctor_set(x_18, 1, x_17); -x_19 = l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__26; +x_17 = l_Nat_repr(x_16); +x_18 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_18, 0, x_17); +x_19 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_19, 0, x_15); +lean_ctor_set(x_19, 1, x_18); x_20 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_20, 0, x_19); -lean_ctor_set(x_20, 1, x_18); -x_21 = l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__27; -x_22 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_22, 0, x_20); -lean_ctor_set(x_22, 1, x_21); -x_23 = l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__25; -x_24 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_20, 1, x_8); +x_21 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_10); +x_22 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__8; +x_23 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_23, 0, x_21); +lean_ctor_set(x_23, 1, x_22); +x_24 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_24, 0, x_23); -lean_ctor_set(x_24, 1, x_22); -x_25 = 0; -x_26 = lean_alloc_ctor(5, 1, 1); -lean_ctor_set(x_26, 0, x_24); -lean_ctor_set_uint8(x_26, sizeof(void*)*1, x_25); -return x_26; +lean_ctor_set(x_24, 1, x_14); +x_25 = lean_ctor_get(x_1, 2); +lean_inc(x_25); +x_26 = l___private_Lean_Data_Position_0__Lean_reprPosition____x40_Lean_Data_Position___hyg_115_(x_25, x_4); +x_27 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_27, 0, x_24); +lean_ctor_set(x_27, 1, x_26); +x_28 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_8); +x_29 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_10); +x_30 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__10; +x_31 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +x_32 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_14); +x_33 = lean_ctor_get(x_1, 3); +lean_inc(x_33); +lean_dec(x_1); +x_34 = l_Nat_repr(x_33); +x_35 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_35, 0, x_34); +x_36 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_36, 0, x_32); +lean_ctor_set(x_36, 1, x_35); +x_37 = l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__26; +x_38 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_36); +x_39 = l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__27; +x_40 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +x_41 = l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__25; +x_42 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_40); +x_43 = 0; +x_44 = lean_alloc_ctor(5, 1, 1); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set_uint8(x_44, sizeof(void*)*1, x_43); +return x_44; } } -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115_(x_1, x_2); +x_3 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203_(x_1, x_2); lean_dec(x_2); return x_3; } @@ -372,7 +492,7 @@ static lean_object* _init_l_Lean_instReprDeclarationRange___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____boxed), 2, 0); +x_1 = lean_alloc_closure((void*)(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____boxed), 2, 0); return x_1; } } @@ -403,7 +523,7 @@ x_1 = l_Lean_instInhabitedDeclarationRanges___closed__1; return x_1; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__1() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__1() { _start: { lean_object* x_1; @@ -411,33 +531,33 @@ x_1 = lean_mk_string("range"); return x_1; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__2() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__1; +x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__3() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__2; +x_2 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__2; x_3 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__4() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__3; +x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__3; x_2 = l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_6324____closed__4; x_3 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_3, 0, x_1); @@ -445,7 +565,7 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__5() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__5() { _start: { lean_object* x_1; @@ -453,25 +573,25 @@ x_1 = lean_mk_string("selectionRange"); return x_1; } } -static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__6() { +static lean_object* _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__6() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__5; +x_1 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__5; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172_(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294_(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; lean_object* x_26; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_unsigned_to_nat(0u); -x_5 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115_(x_3, x_4); -x_6 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__4; +x_5 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203_(x_3, x_4); +x_6 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__4; x_7 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); @@ -483,7 +603,7 @@ x_10 = lean_box(1); x_11 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_11, 0, x_9); lean_ctor_set(x_11, 1, x_10); -x_12 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__6; +x_12 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__6; x_13 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); @@ -494,7 +614,7 @@ lean_ctor_set(x_15, 1, x_14); x_16 = lean_ctor_get(x_1, 1); lean_inc(x_16); lean_dec(x_1); -x_17 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115_(x_16, x_4); +x_17 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203_(x_16, x_4); x_18 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_18, 0, x_15); lean_ctor_set(x_18, 1, x_17); @@ -517,11 +637,11 @@ lean_ctor_set_uint8(x_26, sizeof(void*)*1, x_25); return x_26; } } -lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172_(x_1, x_2); +x_3 = l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294_(x_1, x_2); lean_dec(x_2); return x_3; } @@ -530,7 +650,7 @@ static lean_object* _init_l_Lean_instReprDeclarationRanges___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____boxed), 2, 0); +x_1 = lean_alloc_closure((void*)(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____boxed), 2, 0); return x_1; } } @@ -542,7 +662,7 @@ x_1 = l_Lean_instReprDeclarationRanges___closed__1; return x_1; } } -static lean_object* _init_l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___closed__1() { +static lean_object* _init_l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -554,7 +674,7 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; @@ -574,7 +694,7 @@ return x_9; else { lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___closed__1; +x_10 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___closed__1; x_11 = lean_array_get(x_10, x_4, x_6); lean_inc(x_1); lean_inc(x_3); @@ -607,7 +727,7 @@ goto _start; } } } -lean_object* l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_13; @@ -624,7 +744,7 @@ x_14 = lean_nat_add(x_2, x_3); x_15 = lean_unsigned_to_nat(2u); x_16 = lean_nat_div(x_14, x_15); lean_dec(x_14); -x_46 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___closed__1; +x_46 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___closed__1; x_47 = lean_array_get(x_46, x_1, x_16); x_48 = lean_array_get(x_46, x_1, x_2); x_49 = lean_ctor_get(x_47, 0); @@ -651,7 +771,7 @@ goto block_45; block_45: { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; -x_18 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___closed__1; +x_18 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___closed__1; x_19 = lean_array_get(x_18, x_17, x_3); x_20 = lean_array_get(x_18, x_17, x_2); x_21 = lean_ctor_get(x_19, 0); @@ -677,7 +797,7 @@ lean_object* x_27; lean_object* x_28; lean_dec(x_16); x_27 = l_Array_qsort_sort___at_Lean_mkMapDeclarationExtension___spec__1___rarg___closed__1; lean_inc_n(x_2, 2); -x_28 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3(x_27, x_3, x_19, x_17, x_2, x_2); +x_28 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3(x_27, x_3, x_19, x_17, x_2, x_2); x_4 = x_28; goto block_12; } @@ -690,7 +810,7 @@ lean_dec(x_16); x_30 = lean_array_get(x_18, x_29, x_3); x_31 = l_Array_qsort_sort___at_Lean_mkMapDeclarationExtension___spec__1___rarg___closed__1; lean_inc_n(x_2, 2); -x_32 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3(x_31, x_3, x_30, x_29, x_2, x_2); +x_32 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3(x_31, x_3, x_30, x_29, x_2, x_2); x_4 = x_32; goto block_12; } @@ -717,7 +837,7 @@ lean_object* x_39; lean_object* x_40; lean_dec(x_16); x_39 = l_Array_qsort_sort___at_Lean_mkMapDeclarationExtension___spec__1___rarg___closed__1; lean_inc_n(x_2, 2); -x_40 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3(x_39, x_3, x_35, x_33, x_2, x_2); +x_40 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3(x_39, x_3, x_35, x_33, x_2, x_2); x_4 = x_40; goto block_12; } @@ -730,7 +850,7 @@ lean_dec(x_16); x_42 = lean_array_get(x_18, x_41, x_3); x_43 = l_Array_qsort_sort___at_Lean_mkMapDeclarationExtension___spec__1___rarg___closed__1; lean_inc_n(x_2, 2); -x_44 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3(x_43, x_3, x_42, x_41, x_2, x_2); +x_44 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3(x_43, x_3, x_42, x_41, x_2, x_2); x_4 = x_44; goto block_12; } @@ -749,7 +869,7 @@ x_7 = lean_nat_dec_le(x_3, x_5); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__2(x_6, x_2, x_5); +x_8 = l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__2(x_6, x_2, x_5); x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_add(x_5, x_9); lean_dec(x_5); @@ -766,7 +886,7 @@ return x_6; } } } -uint8_t l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__6(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4) { +uint8_t l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__6(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4) { _start: { uint8_t x_5; @@ -804,7 +924,7 @@ return x_14; } } } -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__5(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__5(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; @@ -849,7 +969,7 @@ size_t x_16; size_t x_17; uint8_t x_18; x_16 = 0; x_17 = lean_usize_of_nat(x_8); lean_dec(x_8); -x_18 = l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__6(x_1, x_6, x_16, x_17); +x_18 = l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__6(x_1, x_6, x_16, x_17); lean_dec(x_6); if (x_18 == 0) { @@ -920,7 +1040,7 @@ size_t x_39; size_t x_40; uint8_t x_41; x_39 = 0; x_40 = lean_usize_of_nat(x_31); lean_dec(x_31); -x_41 = l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__6(x_1, x_29, x_39, x_40); +x_41 = l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__6(x_1, x_29, x_39, x_40); lean_dec(x_29); if (x_41 == 0) { @@ -954,7 +1074,7 @@ return x_52; } } } -lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__4(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__4(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; @@ -987,11 +1107,11 @@ lean_ctor_set(x_14, 2, x_10); lean_ctor_set(x_14, 3, x_11); lean_ctor_set(x_14, 4, x_12); lean_ctor_set(x_14, 5, x_13); -x_15 = l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__5(x_14, x_2); +x_15 = l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__5(x_14, x_2); return x_15; } } -lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1___lambda__1(lean_object* x_1) { +lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1___lambda__1(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; @@ -1004,36 +1124,36 @@ x_6 = lean_unsigned_to_nat(1u); x_7 = lean_nat_sub(x_5, x_6); lean_dec(x_5); x_8 = lean_unsigned_to_nat(0u); -x_9 = l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__2(x_4, x_8, x_7); +x_9 = l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__2(x_4, x_8, x_7); lean_dec(x_7); return x_9; } } -static lean_object* _init_l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1___closed__1() { +static lean_object* _init_l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1___lambda__1), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1___lambda__1), 1, 0); return x_1; } } -lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = l_Lean_mkMapDeclarationExtension___rarg___closed__1; x_4 = l_Lean_mkMapDeclarationExtension___rarg___closed__2; -x_5 = l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1___closed__1; +x_5 = l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1___closed__1; x_6 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_6, 0, x_1); lean_ctor_set(x_6, 1, x_3); lean_ctor_set(x_6, 2, x_4); lean_ctor_set(x_6, 3, x_5); -x_7 = l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__4(x_6, x_2); +x_7 = l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__4(x_6, x_2); return x_7; } } -static lean_object* _init_l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__1() { +static lean_object* _init_l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__1() { _start: { lean_object* x_1; @@ -1041,44 +1161,44 @@ x_1 = lean_mk_string("declranges"); return x_1; } } -static lean_object* _init_l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__2() { +static lean_object* _init_l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__1; +x_2 = l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216_(lean_object* x_1) { +lean_object* l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__2; -x_3 = l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1(x_2, x_1); +x_2 = l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__2; +x_3 = l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1(x_2, x_1); return x_3; } } -lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; -x_7 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_2); return x_7; } } -lean_object* l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__2(x_1, x_2, x_3); +x_4 = l_Array_qsort_sort___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__2(x_1, x_2, x_3); lean_dec(x_3); return x_4; } } -lean_object* l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { size_t x_5; size_t x_6; uint8_t x_7; lean_object* x_8; @@ -1086,7 +1206,7 @@ x_5 = lean_unbox_usize(x_3); lean_dec(x_3); x_6 = lean_unbox_usize(x_4); lean_dec(x_4); -x_7 = l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__6(x_1, x_2, x_5, x_6); +x_7 = l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__6(x_1, x_2, x_5, x_6); lean_dec(x_2); lean_dec(x_1); x_8 = lean_box(x_7); @@ -1319,7 +1439,7 @@ x_7 = lean_nat_add(x_3, x_4); x_8 = lean_unsigned_to_nat(2u); x_9 = lean_nat_div(x_7, x_8); lean_dec(x_7); -x_10 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___closed__1; +x_10 = l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___closed__1; x_11 = lean_array_get(x_10, x_1, x_9); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); @@ -1666,18 +1786,26 @@ l_Lean_instInhabitedDeclarationRange___closed__1 = _init_l_Lean_instInhabitedDec lean_mark_persistent(l_Lean_instInhabitedDeclarationRange___closed__1); l_Lean_instInhabitedDeclarationRange = _init_l_Lean_instInhabitedDeclarationRange(); lean_mark_persistent(l_Lean_instInhabitedDeclarationRange); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__1 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__1(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__1); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__2 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__2(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__2); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__3 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__3(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__3); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__4 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__4(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__4); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__5 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__5(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__5); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__6 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__6(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_115____closed__6); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__1 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__1(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__1); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__2 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__2(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__2); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__3 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__3(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__3); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__4 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__4(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__4); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__5 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__5(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__5); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__6 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__6(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__6); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__7 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__7(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__7); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__8 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__8(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__8); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__9 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__9(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__9); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__10 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__10(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRange____x40_Lean_DeclarationRange___hyg_203____closed__10); l_Lean_instReprDeclarationRange___closed__1 = _init_l_Lean_instReprDeclarationRange___closed__1(); lean_mark_persistent(l_Lean_instReprDeclarationRange___closed__1); l_Lean_instReprDeclarationRange = _init_l_Lean_instReprDeclarationRange(); @@ -1686,30 +1814,30 @@ l_Lean_instInhabitedDeclarationRanges___closed__1 = _init_l_Lean_instInhabitedDe lean_mark_persistent(l_Lean_instInhabitedDeclarationRanges___closed__1); l_Lean_instInhabitedDeclarationRanges = _init_l_Lean_instInhabitedDeclarationRanges(); lean_mark_persistent(l_Lean_instInhabitedDeclarationRanges); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__1 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__1(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__1); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__2 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__2(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__2); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__3 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__3(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__3); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__4 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__4(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__4); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__5 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__5(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__5); -l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__6 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__6(); -lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_172____closed__6); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__1 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__1(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__1); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__2 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__2(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__2); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__3 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__3(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__3); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__4 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__4(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__4); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__5 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__5(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__5); +l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__6 = _init_l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__6(); +lean_mark_persistent(l___private_Lean_DeclarationRange_0__Lean_reprDeclarationRanges____x40_Lean_DeclarationRange___hyg_294____closed__6); l_Lean_instReprDeclarationRanges___closed__1 = _init_l_Lean_instReprDeclarationRanges___closed__1(); lean_mark_persistent(l_Lean_instReprDeclarationRanges___closed__1); l_Lean_instReprDeclarationRanges = _init_l_Lean_instReprDeclarationRanges(); lean_mark_persistent(l_Lean_instReprDeclarationRanges); -l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___closed__1 = _init_l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___closed__1(); -lean_mark_persistent(l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__3___closed__1); -l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1___closed__1 = _init_l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1___closed__1(); -lean_mark_persistent(l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____spec__1___closed__1); -l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__1 = _init_l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__1(); -lean_mark_persistent(l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__1); -l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__2 = _init_l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__2(); -lean_mark_persistent(l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216____closed__2); +l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___closed__1 = _init_l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___closed__1(); +lean_mark_persistent(l_Array_qpartition_loop___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__3___closed__1); +l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1___closed__1 = _init_l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1___closed__1(); +lean_mark_persistent(l_Lean_mkMapDeclarationExtension___at_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____spec__1___closed__1); +l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__1 = _init_l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__1(); +lean_mark_persistent(l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__1); +l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__2 = _init_l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__2(); +lean_mark_persistent(l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338____closed__2); l_Lean_declRangeExt___closed__1 = _init_l_Lean_declRangeExt___closed__1(); lean_mark_persistent(l_Lean_declRangeExt___closed__1); l_Lean_declRangeExt___closed__2 = _init_l_Lean_declRangeExt___closed__2(); @@ -1720,7 +1848,7 @@ l_Lean_declRangeExt___closed__4 = _init_l_Lean_declRangeExt___closed__4(); lean_mark_persistent(l_Lean_declRangeExt___closed__4); l_Lean_declRangeExt___closed__5 = _init_l_Lean_declRangeExt___closed__5(); lean_mark_persistent(l_Lean_declRangeExt___closed__5); -res = l_Lean_initFn____x40_Lean_DeclarationRange___hyg_216_(lean_io_mk_world()); +res = l_Lean_initFn____x40_Lean_DeclarationRange___hyg_338_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_declRangeExt = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_declRangeExt); diff --git a/stage0/stdlib/Lean/Elab/Declaration.c b/stage0/stdlib/Lean/Elab/Declaration.c index 48594b407d..00bbe2e5c1 100644 --- a/stage0/stdlib/Lean/Elab/Declaration.c +++ b/stage0/stdlib/Lean/Elab/Declaration.c @@ -54,6 +54,7 @@ lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Declaration_0__Lean lean_object* l___regBuiltin_Lean_Elab_Command_expandInitialize___closed__1; lean_object* l_Lean_Elab_Command_checkValidCtorModifier___at___private_Lean_Elab_Declaration_0__Lean_Elab_Command_inductiveSyntaxToView___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1142____closed__5; +lean_object* l_Lean_Elab_Command_elabDeclaration___closed__4; lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_commandElabAttribute; lean_object* l_Lean_Elab_Command_expandDeclNamespace_x3f_match__2___rarg(lean_object*, lean_object*, lean_object*); @@ -180,6 +181,7 @@ lean_object* l_Lean_Elab_Command_elabAxiom___lambda__1(lean_object*, lean_object extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__2; lean_object* l___regBuiltin_Lean_Elab_Command_expandMutualPreamble(lean_object*); lean_object* l_Lean_Elab_Command_expandInitCmd___closed__10; +extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353____closed__1; lean_object* l_Lean_Elab_Command_expandDeclNamespace_x3f_match__1(lean_object*); extern lean_object* l_Lean_Elab_Command_checkValidCtorModifier___rarg___lambda__1___closed__3; lean_object* l___private_Lean_Elab_Declaration_0__Lean_Elab_Command_inductiveSyntaxToView_match__2___rarg(lean_object*, lean_object*); @@ -244,7 +246,6 @@ lean_object* l_Lean_Elab_checkNotAlreadyDeclared___at___private_Lean_Elab_Declar lean_object* l_Lean_Elab_addAuxDeclarationRanges___at___private_Lean_Elab_Declaration_0__Lean_Elab_Command_inductiveSyntaxToView___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandInitCmd(uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Command_expandMutualNamespace___spec__1___closed__1; -extern lean_object* l_Lean_Parser_Command_end___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_expandInitCmd___closed__4; lean_object* l_Lean_Elab_Command_expandInitCmd___closed__11; extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3377____closed__18; @@ -253,7 +254,6 @@ extern lean_object* l_Lean_Elab_macroAttribute; lean_object* l_Lean_Syntax_setArg(lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3377____closed__30; extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1142____closed__7; -extern lean_object* l_Lean_Parser_Command_end___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_elabMutual(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_initFn____x40_Lean_Compiler_InitAttr___hyg_551____closed__2; lean_object* l___private_Lean_Elab_Declaration_0__Lean_Elab_Command_elabMutualInductive(lean_object*, lean_object*, lean_object*, lean_object*); @@ -333,6 +333,7 @@ lean_object* l_Lean_Elab_Command_elabDeclaration___closed__2; extern lean_object* l_Lean_mkOptionalNode___closed__2; lean_object* l_Lean_Elab_Command_elabAxiom___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_checkValidCtorModifier___at___private_Lean_Elab_Declaration_0__Lean_Elab_Command_inductiveSyntaxToView___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_FileMap_leanPosToLspPos(lean_object*, lean_object*); extern lean_object* l_Lean_expandExplicitBindersAux_loop___closed__4; extern lean_object* l_myMacro____x40_Init_Notation___hyg_12864____closed__5; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); @@ -1718,83 +1719,112 @@ return x_2; lean_object* l_Lean_Elab_getDeclarationRange___at_Lean_Elab_Command_elabAxiom___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; lean_object* x_6; -x_5 = l_Lean_Syntax_getPos(x_1); -x_6 = l_Lean_Syntax_getTailPos(x_1); -if (lean_obj_tag(x_5) == 0) -{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_2, 1); +x_6 = l_Lean_Syntax_getPos(x_1); +x_7 = l_Lean_Syntax_getTailPos(x_1); if (lean_obj_tag(x_6) == 0) { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = lean_ctor_get(x_2, 1); +lean_object* x_8; lean_object* x_9; lean_object* x_10; x_8 = lean_unsigned_to_nat(0u); -x_9 = l_Lean_FileMap_toPosition(x_7, x_8); +x_9 = l_Lean_FileMap_toPosition(x_5, x_8); lean_inc(x_9); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_9); -lean_ctor_set(x_10, 1, x_9); -x_11 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_11, 0, x_10); -lean_ctor_set(x_11, 1, x_4); -return x_11; +x_10 = l_Lean_FileMap_leanPosToLspPos(x_5, x_9); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 1); +lean_inc(x_11); +lean_dec(x_10); +lean_inc(x_11); +lean_inc(x_9); +x_12 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_12, 0, x_9); +lean_ctor_set(x_12, 1, x_11); +lean_ctor_set(x_12, 2, x_9); +lean_ctor_set(x_12, 3, x_11); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_4); +return x_13; } else { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_12 = lean_ctor_get(x_6, 0); -lean_inc(x_12); -lean_dec(x_6); -x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_unsigned_to_nat(0u); -x_15 = l_Lean_FileMap_toPosition(x_13, x_14); -x_16 = l_Lean_FileMap_toPosition(x_13, x_12); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_16); -x_18 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_4); -return x_18; +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_14 = lean_ctor_get(x_10, 1); +lean_inc(x_14); +lean_dec(x_10); +x_15 = lean_ctor_get(x_7, 0); +lean_inc(x_15); +lean_dec(x_7); +x_16 = l_Lean_FileMap_toPosition(x_5, x_15); +lean_inc(x_16); +x_17 = l_Lean_FileMap_leanPosToLspPos(x_5, x_16); +x_18 = lean_ctor_get(x_17, 1); +lean_inc(x_18); +lean_dec(x_17); +x_19 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_19, 0, x_9); +lean_ctor_set(x_19, 1, x_14); +lean_ctor_set(x_19, 2, x_16); +lean_ctor_set(x_19, 3, x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_4); +return x_20; } } else { -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_19 = lean_ctor_get(x_5, 0); -lean_inc(x_19); -lean_dec(x_5); -x_20 = lean_ctor_get(x_2, 1); -x_21 = l_Lean_FileMap_toPosition(x_20, x_19); +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_6, 0); lean_inc(x_21); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_21); -lean_ctor_set(x_22, 1, x_21); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_4); -return x_23; +lean_dec(x_6); +x_22 = l_Lean_FileMap_toPosition(x_5, x_21); +lean_inc(x_22); +x_23 = l_Lean_FileMap_leanPosToLspPos(x_5, x_22); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_dec(x_23); +lean_inc(x_24); +lean_inc(x_22); +x_25 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_25, 0, x_22); +lean_ctor_set(x_25, 1, x_24); +lean_ctor_set(x_25, 2, x_22); +lean_ctor_set(x_25, 3, x_24); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_4); +return x_26; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_24 = lean_ctor_get(x_5, 0); -lean_inc(x_24); -lean_dec(x_5); -x_25 = lean_ctor_get(x_6, 0); -lean_inc(x_25); -lean_dec(x_6); -x_26 = lean_ctor_get(x_2, 1); -x_27 = l_Lean_FileMap_toPosition(x_26, x_24); -x_28 = l_Lean_FileMap_toPosition(x_26, x_25); -x_29 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -x_30 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_30, 0, x_29); -lean_ctor_set(x_30, 1, x_4); -return x_30; +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_27 = lean_ctor_get(x_23, 1); +lean_inc(x_27); +lean_dec(x_23); +x_28 = lean_ctor_get(x_7, 0); +lean_inc(x_28); +lean_dec(x_7); +x_29 = l_Lean_FileMap_toPosition(x_5, x_28); +lean_inc(x_29); +x_30 = l_Lean_FileMap_leanPosToLspPos(x_5, x_29); +x_31 = lean_ctor_get(x_30, 1); +lean_inc(x_31); +lean_dec(x_30); +x_32 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_32, 0, x_22); +lean_ctor_set(x_32, 1, x_27); +lean_ctor_set(x_32, 2, x_29); +lean_ctor_set(x_32, 3, x_31); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_4); +return x_33; } } } @@ -4793,6 +4823,16 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } +static lean_object* _init_l_Lean_Elab_Command_elabDeclaration___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1142____closed__3; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353____closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} lean_object* l_Lean_Elab_Command_elabDeclaration(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -4964,7 +5004,7 @@ lean_ctor_set(x_53, 0, x_52); lean_ctor_set(x_53, 1, x_51); x_54 = lean_array_push(x_49, x_53); x_55 = lean_array_push(x_54, x_38); -x_56 = l_Lean_Parser_Command_end___elambda__1___closed__1; +x_56 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353____closed__1; x_57 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_57, 0, x_41); lean_ctor_set(x_57, 1, x_56); @@ -4975,7 +5015,7 @@ x_61 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_61, 0, x_60); lean_ctor_set(x_61, 1, x_59); x_62 = lean_array_push(x_58, x_61); -x_63 = l_Lean_Parser_Command_end___elambda__1___closed__2; +x_63 = l_Lean_Elab_Command_elabDeclaration___closed__4; x_64 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_64, 0, x_63); lean_ctor_set(x_64, 1, x_62); @@ -6269,7 +6309,7 @@ lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_34); x_37 = lean_array_push(x_32, x_36); x_38 = lean_array_push(x_37, x_26); -x_39 = l_Lean_Parser_Command_end___elambda__1___closed__1; +x_39 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353____closed__1; x_40 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_40, 0, x_29); lean_ctor_set(x_40, 1, x_39); @@ -6280,7 +6320,7 @@ x_44 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_44, 0, x_43); lean_ctor_set(x_44, 1, x_42); x_45 = lean_array_push(x_41, x_44); -x_46 = l_Lean_Parser_Command_end___elambda__1___closed__2; +x_46 = l_Lean_Elab_Command_elabDeclaration___closed__4; x_47 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_45); @@ -6314,7 +6354,7 @@ lean_ctor_set(x_58, 0, x_57); lean_ctor_set(x_58, 1, x_56); x_59 = lean_array_push(x_54, x_58); x_60 = lean_array_push(x_59, x_26); -x_61 = l_Lean_Parser_Command_end___elambda__1___closed__1; +x_61 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353____closed__1; x_62 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_62, 0, x_50); lean_ctor_set(x_62, 1, x_61); @@ -6325,7 +6365,7 @@ x_66 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_66, 0, x_65); lean_ctor_set(x_66, 1, x_64); x_67 = lean_array_push(x_63, x_66); -x_68 = l_Lean_Parser_Command_end___elambda__1___closed__2; +x_68 = l_Lean_Elab_Command_elabDeclaration___closed__4; x_69 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_69, 0, x_68); lean_ctor_set(x_69, 1, x_67); @@ -6918,13 +6958,13 @@ if (x_29 == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; 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_30 = lean_ctor_get(x_28, 0); -x_31 = l_Lean_Parser_Command_end___elambda__1___closed__1; +x_31 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353____closed__1; x_32 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_32, 0, x_30); lean_ctor_set(x_32, 1, x_31); x_33 = lean_array_push(x_19, x_32); x_34 = lean_array_push(x_33, x_21); -x_35 = l_Lean_Parser_Command_end___elambda__1___closed__2; +x_35 = l_Lean_Elab_Command_elabDeclaration___closed__4; x_36 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_34); @@ -6952,13 +6992,13 @@ x_46 = lean_ctor_get(x_28, 1); lean_inc(x_46); lean_inc(x_45); lean_dec(x_28); -x_47 = l_Lean_Parser_Command_end___elambda__1___closed__1; +x_47 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_353____closed__1; x_48 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_48, 0, x_45); lean_ctor_set(x_48, 1, x_47); x_49 = lean_array_push(x_19, x_48); x_50 = lean_array_push(x_49, x_21); -x_51 = l_Lean_Parser_Command_end___elambda__1___closed__2; +x_51 = l_Lean_Elab_Command_elabDeclaration___closed__4; x_52 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_52, 1, x_50); @@ -8505,6 +8545,8 @@ l_Lean_Elab_Command_elabDeclaration___closed__2 = _init_l_Lean_Elab_Command_elab lean_mark_persistent(l_Lean_Elab_Command_elabDeclaration___closed__2); l_Lean_Elab_Command_elabDeclaration___closed__3 = _init_l_Lean_Elab_Command_elabDeclaration___closed__3(); lean_mark_persistent(l_Lean_Elab_Command_elabDeclaration___closed__3); +l_Lean_Elab_Command_elabDeclaration___closed__4 = _init_l_Lean_Elab_Command_elabDeclaration___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabDeclaration___closed__4); l___regBuiltin_Lean_Elab_Command_elabDeclaration___closed__1 = _init_l___regBuiltin_Lean_Elab_Command_elabDeclaration___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabDeclaration___closed__1); res = l___regBuiltin_Lean_Elab_Command_elabDeclaration(lean_io_mk_world()); diff --git a/stage0/stdlib/Lean/Elab/DeclarationRange.c b/stage0/stdlib/Lean/Elab/DeclarationRange.c index b453024e72..91bb9125ea 100644 --- a/stage0/stdlib/Lean/Elab/DeclarationRange.c +++ b/stage0/stdlib/Lean/Elab/DeclarationRange.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Elab.DeclarationRange -// Imports: Init Lean.DeclarationRange Lean.Elab.Log +// Imports: Init Lean.DeclarationRange Lean.Elab.Log Lean.Data.Lsp.Utf16 #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -16,178 +16,154 @@ extern "C" { lean_object* l_Lean_addDeclarationRanges___rarg(lean_object*, lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_addDeclarationRanges___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__3(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_example___elambda__1___closed__2; lean_object* l_Lean_Elab_addDeclarationRanges___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_getDeclarationRange(lean_object*); -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_addAuxDeclarationRanges___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*); lean_object* l_Lean_Elab_addAuxDeclarationRanges(lean_object*); lean_object* l_Lean_Elab_addDeclarationRanges___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_setArg(lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3377____closed__28; lean_object* l_Lean_Elab_addDeclarationRanges(lean_object*); -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getKind(lean_object*); lean_object* l_Lean_Elab_getDeclarationRange___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getPos(lean_object*); extern lean_object* l_Lean_mkOptionalNode___closed__1; lean_object* l_Lean_Elab_addAuxDeclarationRanges___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getTailPos(lean_object*); -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__1(lean_object*, lean_object*); +lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_FileMap_leanPosToLspPos(lean_object*, lean_object*); lean_object* l_Lean_Elab_getDeclarationSelectionRef(lean_object*); -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_3 = lean_ctor_get(x_1, 0); -lean_inc(x_3); -lean_dec(x_1); -x_4 = lean_ctor_get(x_3, 1); -lean_inc(x_4); -lean_dec(x_3); -x_5 = lean_unsigned_to_nat(0u); -x_6 = l_Lean_FileMap_toPosition(x_2, x_5); +lean_object* x_4; lean_object* x_5; +x_4 = l_Lean_Syntax_getPos(x_1); +x_5 = l_Lean_Syntax_getTailPos(x_1); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_6 = lean_ctor_get(x_2, 0); lean_inc(x_6); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_6); -lean_ctor_set(x_7, 1, x_6); -x_8 = lean_apply_2(x_4, lean_box(0), x_7); -return x_8; -} -} -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: +lean_dec(x_2); +x_7 = lean_ctor_get(x_6, 1); +lean_inc(x_7); +lean_dec(x_6); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_Lean_FileMap_toPosition(x_3, x_8); +lean_inc(x_9); +x_10 = l_Lean_FileMap_leanPosToLspPos(x_3, x_9); +if (lean_obj_tag(x_5) == 0) { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_ctor_get(x_4, 1); -lean_inc(x_5); -lean_dec(x_4); -x_6 = lean_unsigned_to_nat(0u); -x_7 = l_Lean_FileMap_toPosition(x_3, x_6); -x_8 = l_Lean_FileMap_toPosition(x_3, x_2); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_7); -lean_ctor_set(x_9, 1, x_8); -x_10 = lean_apply_2(x_5, lean_box(0), x_9); -return x_10; +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 1); +lean_inc(x_11); +lean_dec(x_10); +lean_inc(x_11); +lean_inc(x_9); +x_12 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_12, 0, x_9); +lean_ctor_set(x_12, 1, x_11); +lean_ctor_set(x_12, 2, x_9); +lean_ctor_set(x_12, 3, x_11); +x_13 = lean_apply_2(x_7, lean_box(0), x_12); +return x_13; } -} -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: +else { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_ctor_get(x_4, 1); -lean_inc(x_5); -lean_dec(x_4); -x_6 = l_Lean_FileMap_toPosition(x_3, x_2); -lean_inc(x_6); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_6); -lean_ctor_set(x_7, 1, x_6); -x_8 = lean_apply_2(x_5, lean_box(0), x_7); -return x_8; -} -} -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_5 = lean_ctor_get(x_1, 0); -lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_14 = lean_ctor_get(x_10, 1); +lean_inc(x_14); +lean_dec(x_10); +x_15 = lean_ctor_get(x_5, 0); +lean_inc(x_15); lean_dec(x_5); -x_7 = l_Lean_FileMap_toPosition(x_4, x_2); -x_8 = l_Lean_FileMap_toPosition(x_4, x_3); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_7); -lean_ctor_set(x_9, 1, x_8); -x_10 = lean_apply_2(x_6, lean_box(0), x_9); -return x_10; +x_16 = l_Lean_FileMap_toPosition(x_3, x_15); +lean_inc(x_16); +x_17 = l_Lean_FileMap_leanPosToLspPos(x_3, x_16); +x_18 = lean_ctor_get(x_17, 1); +lean_inc(x_18); +lean_dec(x_17); +x_19 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_19, 0, x_9); +lean_ctor_set(x_19, 1, x_14); +lean_ctor_set(x_19, 2, x_16); +lean_ctor_set(x_19, 3, x_18); +x_20 = lean_apply_2(x_7, lean_box(0), x_19); +return x_20; +} +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_21 = lean_ctor_get(x_2, 0); +lean_inc(x_21); +lean_dec(x_2); +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_ctor_get(x_4, 0); +lean_inc(x_23); +lean_dec(x_4); +x_24 = l_Lean_FileMap_toPosition(x_3, x_23); +lean_inc(x_24); +x_25 = l_Lean_FileMap_leanPosToLspPos(x_3, x_24); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_25, 1); +lean_inc(x_26); +lean_dec(x_25); +lean_inc(x_26); +lean_inc(x_24); +x_27 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_27, 0, x_24); +lean_ctor_set(x_27, 1, x_26); +lean_ctor_set(x_27, 2, x_24); +lean_ctor_set(x_27, 3, x_26); +x_28 = lean_apply_2(x_22, lean_box(0), x_27); +return x_28; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_29 = lean_ctor_get(x_25, 1); +lean_inc(x_29); +lean_dec(x_25); +x_30 = lean_ctor_get(x_5, 0); +lean_inc(x_30); +lean_dec(x_5); +x_31 = l_Lean_FileMap_toPosition(x_3, x_30); +lean_inc(x_31); +x_32 = l_Lean_FileMap_leanPosToLspPos(x_3, x_31); +x_33 = lean_ctor_get(x_32, 1); +lean_inc(x_33); +lean_dec(x_32); +x_34 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_34, 0, x_24); +lean_ctor_set(x_34, 1, x_29); +lean_ctor_set(x_34, 2, x_31); +lean_ctor_set(x_34, 3, x_33); +x_35 = lean_apply_2(x_22, lean_box(0), x_34); +return x_35; +} +} } } lean_object* l_Lean_Elab_getDeclarationRange___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; -x_4 = l_Lean_Syntax_getPos(x_3); -x_5 = l_Lean_Syntax_getTailPos(x_3); -if (lean_obj_tag(x_4) == 0) -{ -if (lean_obj_tag(x_5) == 0) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -x_7 = lean_alloc_closure((void*)(l_Lean_Elab_getDeclarationRange___rarg___lambda__1___boxed), 2, 1); -lean_closure_set(x_7, 0, x_1); -x_8 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_2, x_7); -return x_8; -} -else -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_9 = lean_ctor_get(x_1, 1); -lean_inc(x_9); -x_10 = lean_ctor_get(x_5, 0); -lean_inc(x_10); -lean_dec(x_5); -x_11 = lean_alloc_closure((void*)(l_Lean_Elab_getDeclarationRange___rarg___lambda__2___boxed), 3, 2); -lean_closure_set(x_11, 0, x_1); -lean_closure_set(x_11, 1, x_10); -x_12 = lean_apply_4(x_9, lean_box(0), lean_box(0), x_2, x_11); -return x_12; -} -} -else -{ -if (lean_obj_tag(x_5) == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_13 = lean_ctor_get(x_1, 1); -lean_inc(x_13); -x_14 = lean_ctor_get(x_4, 0); -lean_inc(x_14); -lean_dec(x_4); -x_15 = lean_alloc_closure((void*)(l_Lean_Elab_getDeclarationRange___rarg___lambda__3___boxed), 3, 2); -lean_closure_set(x_15, 0, x_1); -lean_closure_set(x_15, 1, x_14); -x_16 = lean_apply_4(x_13, lean_box(0), lean_box(0), x_2, x_15); -return x_16; -} -else -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_17 = lean_ctor_get(x_1, 1); -lean_inc(x_17); -x_18 = lean_ctor_get(x_4, 0); -lean_inc(x_18); -lean_dec(x_4); -x_19 = lean_ctor_get(x_5, 0); -lean_inc(x_19); -lean_dec(x_5); -x_20 = lean_alloc_closure((void*)(l_Lean_Elab_getDeclarationRange___rarg___lambda__4___boxed), 4, 3); -lean_closure_set(x_20, 0, x_1); -lean_closure_set(x_20, 1, x_18); -lean_closure_set(x_20, 2, x_19); -x_21 = lean_apply_4(x_17, lean_box(0), lean_box(0), x_2, x_20); -return x_21; -} -} +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +x_5 = lean_alloc_closure((void*)(l_Lean_Elab_getDeclarationRange___rarg___lambda__1___boxed), 3, 2); +lean_closure_set(x_5, 0, x_3); +lean_closure_set(x_5, 1, x_1); +x_6 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_2, x_5); +return x_6; } } lean_object* l_Lean_Elab_getDeclarationRange(lean_object* x_1) { @@ -198,42 +174,15 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Elab_getDeclarationRange___rarg), 3, 0); return x_2; } } -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_Elab_getDeclarationRange___rarg___lambda__1(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Elab_getDeclarationRange___rarg___lambda__2(x_1, x_2, x_3); +x_4 = l_Lean_Elab_getDeclarationRange___rarg___lambda__1(x_1, x_2, x_3); lean_dec(x_3); return x_4; } } -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_getDeclarationRange___rarg___lambda__3(x_1, x_2, x_3); -lean_dec(x_3); -return x_4; -} -} -lean_object* l_Lean_Elab_getDeclarationRange___rarg___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_Elab_getDeclarationRange___rarg___lambda__4(x_1, x_2, x_3, x_4); -lean_dec(x_4); -return x_5; -} -} lean_object* l_Lean_Elab_getDeclarationSelectionRef(lean_object* x_1) { _start: { @@ -387,6 +336,7 @@ return x_2; lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_DeclarationRange(lean_object*); lean_object* initialize_Lean_Elab_Log(lean_object*); +lean_object* initialize_Lean_Data_Lsp_Utf16(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Elab_DeclarationRange(lean_object* w) { lean_object * res; @@ -401,6 +351,9 @@ lean_dec_ref(res); res = initialize_Lean_Elab_Log(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Data_Lsp_Utf16(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Elab/LetRec.c b/stage0/stdlib/Lean/Elab/LetRec.c index b38b9a3957..8bc89022cd 100644 --- a/stage0/stdlib/Lean/Elab/LetRec.c +++ b/stage0/stdlib/Lean/Elab/LetRec.c @@ -198,6 +198,7 @@ lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, uin lean_object* l_Lean_Syntax_getTailPos(lean_object*); lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_registerLetRecsToLift___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +lean_object* l_Lean_FileMap_leanPosToLspPos(lean_object*, lean_object*); extern lean_object* l_Lean_Meta_CheckAssignment_checkFVar___closed__2; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_List_foldr___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_registerLetRecsToLift___spec__1___boxed(lean_object*, lean_object*, lean_object*); @@ -773,83 +774,112 @@ return x_13; lean_object* l_Lean_Elab_getDeclarationRange___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_9; lean_object* x_10; -x_9 = l_Lean_Syntax_getPos(x_1); -x_10 = l_Lean_Syntax_getTailPos(x_1); -if (lean_obj_tag(x_9) == 0) -{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_2, 1); +x_10 = l_Lean_Syntax_getPos(x_1); +x_11 = l_Lean_Syntax_getTailPos(x_1); 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; -x_11 = lean_ctor_get(x_2, 1); +lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_unsigned_to_nat(0u); -x_13 = l_Lean_FileMap_toPosition(x_11, x_12); +x_13 = l_Lean_FileMap_toPosition(x_9, x_12); lean_inc(x_13); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_13); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_8); -return x_15; +x_14 = l_Lean_FileMap_leanPosToLspPos(x_9, x_13); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +lean_dec(x_14); +lean_inc(x_15); +lean_inc(x_13); +x_16 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_16, 0, x_13); +lean_ctor_set(x_16, 1, x_15); +lean_ctor_set(x_16, 2, x_13); +lean_ctor_set(x_16, 3, x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_8); +return x_17; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 1); -x_18 = lean_unsigned_to_nat(0u); -x_19 = l_Lean_FileMap_toPosition(x_17, x_18); -x_20 = l_Lean_FileMap_toPosition(x_17, x_16); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_21); -lean_ctor_set(x_22, 1, x_8); -return x_22; +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_18 = lean_ctor_get(x_14, 1); +lean_inc(x_18); +lean_dec(x_14); +x_19 = lean_ctor_get(x_11, 0); +lean_inc(x_19); +lean_dec(x_11); +x_20 = l_Lean_FileMap_toPosition(x_9, x_19); +lean_inc(x_20); +x_21 = l_Lean_FileMap_leanPosToLspPos(x_9, x_20); +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_23, 0, x_13); +lean_ctor_set(x_23, 1, x_18); +lean_ctor_set(x_23, 2, x_20); +lean_ctor_set(x_23, 3, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_8); +return x_24; } } else { -if (lean_obj_tag(x_10) == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_23 = lean_ctor_get(x_9, 0); -lean_inc(x_23); -lean_dec(x_9); -x_24 = lean_ctor_get(x_2, 1); -x_25 = l_Lean_FileMap_toPosition(x_24, x_23); +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_10, 0); lean_inc(x_25); -x_26 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_26, 0, x_25); -lean_ctor_set(x_26, 1, 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_8); -return x_27; +lean_dec(x_10); +x_26 = l_Lean_FileMap_toPosition(x_9, x_25); +lean_inc(x_26); +x_27 = l_Lean_FileMap_leanPosToLspPos(x_9, x_26); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +lean_inc(x_28); +lean_inc(x_26); +x_29 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_28); +lean_ctor_set(x_29, 2, x_26); +lean_ctor_set(x_29, 3, x_28); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_8); +return x_30; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_28 = lean_ctor_get(x_9, 0); -lean_inc(x_28); -lean_dec(x_9); -x_29 = lean_ctor_get(x_10, 0); -lean_inc(x_29); -lean_dec(x_10); -x_30 = lean_ctor_get(x_2, 1); -x_31 = l_Lean_FileMap_toPosition(x_30, x_28); -x_32 = l_Lean_FileMap_toPosition(x_30, x_29); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_8); -return x_34; +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_31 = lean_ctor_get(x_27, 1); +lean_inc(x_31); +lean_dec(x_27); +x_32 = lean_ctor_get(x_11, 0); +lean_inc(x_32); +lean_dec(x_11); +x_33 = l_Lean_FileMap_toPosition(x_9, x_32); +lean_inc(x_33); +x_34 = l_Lean_FileMap_leanPosToLspPos(x_9, x_33); +x_35 = lean_ctor_get(x_34, 1); +lean_inc(x_35); +lean_dec(x_34); +x_36 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_36, 0, x_26); +lean_ctor_set(x_36, 1, x_31); +lean_ctor_set(x_36, 2, x_33); +lean_ctor_set(x_36, 3, x_35); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_8); +return x_37; } } } diff --git a/stage0/stdlib/Lean/Elab/MutualDef.c b/stage0/stdlib/Lean/Elab/MutualDef.c index f2232a7240..379ac81042 100644 --- a/stage0/stdlib/Lean/Elab/MutualDef.c +++ b/stage0/stdlib/Lean/Elab/MutualDef.c @@ -654,6 +654,7 @@ lean_object* l___private_Lean_Elab_MutualDef_0__Lean_Elab_Term_MutualClosure_Fix lean_object* l_Lean_throwError___at___private_Lean_Elab_MutualDef_0__Lean_Elab_Term_elabHeaders___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_MutualDef_0__Lean_Elab_Term_withUsed___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withLCtx___at_Lean_Elab_Term_MutualClosure_main___spec__2(lean_object*); +lean_object* l_Lean_FileMap_leanPosToLspPos(lean_object*, lean_object*); lean_object* l_Lean_Elab_instInhabitedDefViewElabHeader; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_MutualDef_0__Lean_Elab_Term_expandWhereDeclsAsStructInst___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withLocalContextImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -4194,83 +4195,112 @@ return x_47; lean_object* l_Lean_Elab_getDeclarationRange___at___private_Lean_Elab_MutualDef_0__Lean_Elab_Term_elabHeaders___spec__12(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_9; lean_object* x_10; -x_9 = l_Lean_Syntax_getPos(x_1); -x_10 = l_Lean_Syntax_getTailPos(x_1); -if (lean_obj_tag(x_9) == 0) -{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_2, 1); +x_10 = l_Lean_Syntax_getPos(x_1); +x_11 = l_Lean_Syntax_getTailPos(x_1); 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; -x_11 = lean_ctor_get(x_2, 1); +lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_unsigned_to_nat(0u); -x_13 = l_Lean_FileMap_toPosition(x_11, x_12); +x_13 = l_Lean_FileMap_toPosition(x_9, x_12); lean_inc(x_13); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_13); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_8); -return x_15; +x_14 = l_Lean_FileMap_leanPosToLspPos(x_9, x_13); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +lean_dec(x_14); +lean_inc(x_15); +lean_inc(x_13); +x_16 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_16, 0, x_13); +lean_ctor_set(x_16, 1, x_15); +lean_ctor_set(x_16, 2, x_13); +lean_ctor_set(x_16, 3, x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_8); +return x_17; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 1); -x_18 = lean_unsigned_to_nat(0u); -x_19 = l_Lean_FileMap_toPosition(x_17, x_18); -x_20 = l_Lean_FileMap_toPosition(x_17, x_16); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_21); -lean_ctor_set(x_22, 1, x_8); -return x_22; +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_18 = lean_ctor_get(x_14, 1); +lean_inc(x_18); +lean_dec(x_14); +x_19 = lean_ctor_get(x_11, 0); +lean_inc(x_19); +lean_dec(x_11); +x_20 = l_Lean_FileMap_toPosition(x_9, x_19); +lean_inc(x_20); +x_21 = l_Lean_FileMap_leanPosToLspPos(x_9, x_20); +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_23, 0, x_13); +lean_ctor_set(x_23, 1, x_18); +lean_ctor_set(x_23, 2, x_20); +lean_ctor_set(x_23, 3, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_8); +return x_24; } } else { -if (lean_obj_tag(x_10) == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_23 = lean_ctor_get(x_9, 0); -lean_inc(x_23); -lean_dec(x_9); -x_24 = lean_ctor_get(x_2, 1); -x_25 = l_Lean_FileMap_toPosition(x_24, x_23); +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_10, 0); lean_inc(x_25); -x_26 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_26, 0, x_25); -lean_ctor_set(x_26, 1, 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_8); -return x_27; +lean_dec(x_10); +x_26 = l_Lean_FileMap_toPosition(x_9, x_25); +lean_inc(x_26); +x_27 = l_Lean_FileMap_leanPosToLspPos(x_9, x_26); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +lean_inc(x_28); +lean_inc(x_26); +x_29 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_28); +lean_ctor_set(x_29, 2, x_26); +lean_ctor_set(x_29, 3, x_28); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_8); +return x_30; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_28 = lean_ctor_get(x_9, 0); -lean_inc(x_28); -lean_dec(x_9); -x_29 = lean_ctor_get(x_10, 0); -lean_inc(x_29); -lean_dec(x_10); -x_30 = lean_ctor_get(x_2, 1); -x_31 = l_Lean_FileMap_toPosition(x_30, x_28); -x_32 = l_Lean_FileMap_toPosition(x_30, x_29); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_8); -return x_34; +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_31 = lean_ctor_get(x_27, 1); +lean_inc(x_31); +lean_dec(x_27); +x_32 = lean_ctor_get(x_11, 0); +lean_inc(x_32); +lean_dec(x_11); +x_33 = l_Lean_FileMap_toPosition(x_9, x_32); +lean_inc(x_33); +x_34 = l_Lean_FileMap_leanPosToLspPos(x_9, x_33); +x_35 = lean_ctor_get(x_34, 1); +lean_inc(x_35); +lean_dec(x_34); +x_36 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_36, 0, x_26); +lean_ctor_set(x_36, 1, x_31); +lean_ctor_set(x_36, 2, x_33); +lean_ctor_set(x_36, 3, x_35); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_8); +return x_37; } } } diff --git a/stage0/stdlib/Lean/Elab/Structure.c b/stage0/stdlib/Lean/Elab/Structure.c index 6517bba1d3..4156148b45 100644 --- a/stage0/stdlib/Lean/Elab/Structure.c +++ b/stage0/stdlib/Lean/Elab/Structure.c @@ -600,6 +600,7 @@ lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Elab_Structure_0__Lea lean_object* l_Lean_throwError___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_withFields___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn(lean_object*); lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandFields_match__2(lean_object*); +lean_object* l_Lean_FileMap_leanPosToLspPos(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_levelMVarToParamFVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -2925,83 +2926,112 @@ return x_13; lean_object* l_Lean_Elab_getDeclarationRange___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__18(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_9; lean_object* x_10; -x_9 = l_Lean_Syntax_getPos(x_1); -x_10 = l_Lean_Syntax_getTailPos(x_1); -if (lean_obj_tag(x_9) == 0) -{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_2, 1); +x_10 = l_Lean_Syntax_getPos(x_1); +x_11 = l_Lean_Syntax_getTailPos(x_1); 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; -x_11 = lean_ctor_get(x_2, 1); +lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_unsigned_to_nat(0u); -x_13 = l_Lean_FileMap_toPosition(x_11, x_12); +x_13 = l_Lean_FileMap_toPosition(x_9, x_12); lean_inc(x_13); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_13); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_8); -return x_15; +x_14 = l_Lean_FileMap_leanPosToLspPos(x_9, x_13); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +lean_dec(x_14); +lean_inc(x_15); +lean_inc(x_13); +x_16 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_16, 0, x_13); +lean_ctor_set(x_16, 1, x_15); +lean_ctor_set(x_16, 2, x_13); +lean_ctor_set(x_16, 3, x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_8); +return x_17; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 1); -x_18 = lean_unsigned_to_nat(0u); -x_19 = l_Lean_FileMap_toPosition(x_17, x_18); -x_20 = l_Lean_FileMap_toPosition(x_17, x_16); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_21); -lean_ctor_set(x_22, 1, x_8); -return x_22; +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_18 = lean_ctor_get(x_14, 1); +lean_inc(x_18); +lean_dec(x_14); +x_19 = lean_ctor_get(x_11, 0); +lean_inc(x_19); +lean_dec(x_11); +x_20 = l_Lean_FileMap_toPosition(x_9, x_19); +lean_inc(x_20); +x_21 = l_Lean_FileMap_leanPosToLspPos(x_9, x_20); +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_23, 0, x_13); +lean_ctor_set(x_23, 1, x_18); +lean_ctor_set(x_23, 2, x_20); +lean_ctor_set(x_23, 3, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_8); +return x_24; } } else { -if (lean_obj_tag(x_10) == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_23 = lean_ctor_get(x_9, 0); -lean_inc(x_23); -lean_dec(x_9); -x_24 = lean_ctor_get(x_2, 1); -x_25 = l_Lean_FileMap_toPosition(x_24, x_23); +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_10, 0); lean_inc(x_25); -x_26 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_26, 0, x_25); -lean_ctor_set(x_26, 1, 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_8); -return x_27; +lean_dec(x_10); +x_26 = l_Lean_FileMap_toPosition(x_9, x_25); +lean_inc(x_26); +x_27 = l_Lean_FileMap_leanPosToLspPos(x_9, x_26); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +lean_inc(x_28); +lean_inc(x_26); +x_29 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_28); +lean_ctor_set(x_29, 2, x_26); +lean_ctor_set(x_29, 3, x_28); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_8); +return x_30; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_28 = lean_ctor_get(x_9, 0); -lean_inc(x_28); -lean_dec(x_9); -x_29 = lean_ctor_get(x_10, 0); -lean_inc(x_29); -lean_dec(x_10); -x_30 = lean_ctor_get(x_2, 1); -x_31 = l_Lean_FileMap_toPosition(x_30, x_28); -x_32 = l_Lean_FileMap_toPosition(x_30, x_29); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_8); -return x_34; +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_31 = lean_ctor_get(x_27, 1); +lean_inc(x_31); +lean_dec(x_27); +x_32 = lean_ctor_get(x_11, 0); +lean_inc(x_32); +lean_dec(x_11); +x_33 = l_Lean_FileMap_toPosition(x_9, x_32); +lean_inc(x_33); +x_34 = l_Lean_FileMap_leanPosToLspPos(x_9, x_33); +x_35 = lean_ctor_get(x_34, 1); +lean_inc(x_35); +lean_dec(x_34); +x_36 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_36, 0, x_26); +lean_ctor_set(x_36, 1, x_31); +lean_ctor_set(x_36, 2, x_33); +lean_ctor_set(x_36, 3, x_35); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_8); +return x_37; } } } diff --git a/stage0/stdlib/Lean/Parser/Transform.c b/stage0/stdlib/Lean/Parser/Transform.c new file mode 100644 index 0000000000..6f4f894d70 --- /dev/null +++ b/stage0/stdlib/Lean/Parser/Transform.c @@ -0,0 +1,1586 @@ +// Lean compiler output +// Module: Lean.Parser.Transform +// Imports: Init Lean.Parser.Basic +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); +lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_setTailInfo(lean_object*, lean_object*); +lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); +lean_object* lean_string_utf8_byte_size(lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); +extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__2; +lean_object* l_Lean_Syntax_removeParen_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_manyToSepBy_match__1(lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* lean_nat_sub(lean_object*, lean_object*); +lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_instInhabitedSourceInfo___closed__1; +lean_object* l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_instInhabitedSyntax; +lean_object* l_Lean_Syntax_manyToSepBy(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getNumArgs(lean_object*); +uint8_t lean_nat_dec_le(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_manyToSepBy_match__2(lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_12262____closed__8; +lean_object* l_Lean_Syntax_removeParen(lean_object*); +uint8_t l_Lean_Syntax_isNone(lean_object*); +lean_object* l_Lean_Syntax_getTailInfo(lean_object*); +extern lean_object* l_prec_x28___x29___closed__7; +lean_object* l_Lean_Syntax_manyToSepBy_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +extern lean_object* l_Lean_mkOptionalNode___closed__2; +lean_object* l_Lean_Syntax_removeParen_match__1(lean_object*); +lean_object* l_Array_back___at_Lean_Syntax_Traverser_up___spec__2(lean_object*); +lean_object* l_Lean_Syntax_manyToSepBy_match__2___rarg(lean_object*, lean_object*, lean_object*); +uint8_t lean_string_dec_eq(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_manyToSepBy_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_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_Syntax_manyToSepBy_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Syntax_manyToSepBy_match__1___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Syntax_manyToSepBy_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +lean_dec(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_2, x_4, x_5); +return x_6; +} +else +{ +lean_object* x_7; +lean_dec(x_2); +x_7 = lean_apply_1(x_3, x_1); +return x_7; +} +} +} +lean_object* l_Lean_Syntax_manyToSepBy_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Syntax_manyToSepBy_match__2___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_ctor_get(x_3, 1); +x_8 = lean_nat_dec_le(x_7, x_5); +if (x_8 == 0) +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_nat_dec_eq(x_4, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_sub(x_4, x_11); +lean_dec(x_4); +x_13 = l_Lean_instInhabitedSyntax; +x_14 = lean_array_get(x_13, x_2, x_5); +x_15 = l_Array_back___at_Lean_Syntax_Traverser_up___spec__2(x_6); +x_16 = l_Lean_Syntax_getTailInfo(x_15); +if (lean_obj_tag(x_16) == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_dec(x_15); +x_17 = l_Lean_instInhabitedSourceInfo___closed__1; +lean_inc(x_1); +x_18 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_1); +x_19 = lean_array_push(x_6, x_18); +x_20 = lean_array_push(x_19, x_14); +x_21 = lean_ctor_get(x_3, 2); +x_22 = lean_nat_add(x_5, x_21); +lean_dec(x_5); +x_4 = x_12; +x_5 = x_22; +x_6 = x_20; +goto _start; +} +else +{ +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; +x_24 = lean_ctor_get(x_16, 0); +lean_inc(x_24); +lean_dec(x_16); +x_25 = lean_array_get_size(x_6); +x_26 = lean_nat_sub(x_25, x_11); +lean_dec(x_25); +x_27 = lean_array_set(x_6, x_26, x_15); +lean_dec(x_26); +lean_inc(x_1); +x_28 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_28, 0, x_24); +lean_ctor_set(x_28, 1, x_1); +x_29 = lean_array_push(x_27, x_28); +x_30 = lean_array_push(x_29, x_14); +x_31 = lean_ctor_get(x_3, 2); +x_32 = lean_nat_add(x_5, x_31); +lean_dec(x_5); +x_4 = x_12; +x_5 = x_32; +x_6 = x_30; +goto _start; +} +} +else +{ +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_6; +} +} +else +{ +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_6; +} +} +} +lean_object* l_Lean_Syntax_manyToSepBy(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +x_5 = lean_array_get_size(x_4); +x_6 = lean_unsigned_to_nat(0u); +x_7 = lean_nat_dec_eq(x_5, x_6); +if (x_7 == 0) +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_1); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_9 = lean_ctor_get(x_1, 1); +lean_dec(x_9); +x_10 = lean_ctor_get(x_1, 0); +lean_dec(x_10); +x_11 = l_Lean_instInhabitedSyntax; +x_12 = lean_array_get(x_11, x_4, x_6); +x_13 = l_Lean_mkOptionalNode___closed__2; +x_14 = lean_array_push(x_13, x_12); +x_15 = lean_unsigned_to_nat(1u); +lean_inc(x_5); +x_16 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_5); +lean_ctor_set(x_16, 2, x_15); +x_17 = l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(x_2, x_4, x_16, x_5, x_15, x_14); +lean_dec(x_16); +lean_dec(x_4); +lean_ctor_set(x_1, 1, x_17); +return x_1; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +lean_dec(x_1); +x_18 = l_Lean_instInhabitedSyntax; +x_19 = lean_array_get(x_18, x_4, x_6); +x_20 = l_Lean_mkOptionalNode___closed__2; +x_21 = lean_array_push(x_20, x_19); +x_22 = lean_unsigned_to_nat(1u); +lean_inc(x_5); +x_23 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_5); +lean_ctor_set(x_23, 2, x_22); +x_24 = l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(x_2, x_4, x_23, x_5, x_22, x_21); +lean_dec(x_23); +lean_dec(x_4); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_3); +lean_ctor_set(x_25, 1, x_24); +return x_25; +} +} +else +{ +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_1; +} +} +else +{ +lean_dec(x_2); +return x_1; +} +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* l_Lean_Syntax_removeParen_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_1) == 2) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; +x_8 = lean_ctor_get(x_5, 2); +lean_inc(x_8); +if (lean_obj_tag(x_8) == 0) +{ +uint8_t x_9; +lean_dec(x_3); +x_9 = !lean_is_exclusive(x_5); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_10 = lean_ctor_get(x_5, 2); +lean_dec(x_10); +x_11 = lean_ctor_get(x_5, 1); +lean_dec(x_11); +x_12 = lean_ctor_get(x_5, 0); +lean_dec(x_12); +x_13 = !lean_is_exclusive(x_1); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_1, 0); +lean_dec(x_14); +lean_ctor_set(x_5, 0, x_8); +x_15 = lean_apply_2(x_4, x_1, x_2); +return x_15; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_1, 1); +lean_inc(x_16); +lean_dec(x_1); +lean_ctor_set(x_5, 0, x_8); +x_17 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_17, 0, x_5); +lean_ctor_set(x_17, 1, x_16); +x_18 = lean_apply_2(x_4, x_17, x_2); +return x_18; +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_dec(x_5); +x_19 = lean_ctor_get(x_1, 1); +lean_inc(x_19); +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_20 = x_1; +} else { + lean_dec_ref(x_1); + x_20 = lean_box(0); +} +x_21 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_21, 0, x_8); +lean_ctor_set(x_21, 1, x_7); +lean_ctor_set(x_21, 2, x_8); +if (lean_is_scalar(x_20)) { + x_22 = lean_alloc_ctor(2, 2, 0); +} else { + x_22 = x_20; +} +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_19); +x_23 = lean_apply_2(x_4, x_22, x_2); +return x_23; +} +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; +x_24 = lean_ctor_get(x_1, 1); +lean_inc(x_24); +x_25 = lean_ctor_get(x_8, 0); +lean_inc(x_25); +x_26 = l_prec_x28___x29___closed__7; +x_27 = lean_string_dec_eq(x_24, x_26); +lean_dec(x_24); +if (x_27 == 0) +{ +lean_object* x_28; +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_3); +x_28 = lean_apply_2(x_4, x_1, x_2); +return x_28; +} +else +{ +uint8_t x_29; +x_29 = !lean_is_exclusive(x_1); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_1, 1); +lean_dec(x_30); +x_31 = lean_ctor_get(x_1, 0); +lean_dec(x_31); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_32; +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_3); +lean_ctor_set(x_1, 1, x_26); +x_32 = lean_apply_2(x_4, x_1, x_2); +return x_32; +} +else +{ +lean_object* x_33; lean_object* x_34; +x_33 = lean_ctor_get(x_2, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +if (lean_obj_tag(x_34) == 0) +{ +uint8_t x_35; +x_35 = !lean_is_exclusive(x_5); +if (x_35 == 0) +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_36 = lean_ctor_get(x_5, 2); +lean_dec(x_36); +x_37 = lean_ctor_get(x_5, 1); +lean_dec(x_37); +x_38 = lean_ctor_get(x_5, 0); +lean_dec(x_38); +x_39 = lean_ctor_get(x_33, 1); +lean_inc(x_39); +if (lean_obj_tag(x_39) == 0) +{ +uint8_t x_40; +x_40 = !lean_is_exclusive(x_2); +if (x_40 == 0) +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_2, 0); +lean_dec(x_41); +x_42 = lean_ctor_get(x_33, 2); +lean_inc(x_42); +if (lean_obj_tag(x_42) == 0) +{ +uint8_t x_43; +lean_dec(x_25); +lean_dec(x_3); +x_43 = !lean_is_exclusive(x_33); +if (x_43 == 0) +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_44 = lean_ctor_get(x_33, 2); +lean_dec(x_44); +x_45 = lean_ctor_get(x_33, 1); +lean_dec(x_45); +x_46 = lean_ctor_get(x_33, 0); +lean_dec(x_46); +lean_ctor_set(x_33, 2, x_8); +lean_ctor_set(x_33, 0, x_42); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_33); +lean_ctor_set(x_5, 2, x_42); +lean_ctor_set(x_5, 1, x_39); +lean_ctor_set(x_5, 0, x_42); +lean_ctor_set(x_2, 0, x_5); +x_47 = lean_apply_2(x_4, x_1, x_2); +return x_47; +} +else +{ +lean_object* x_48; lean_object* x_49; +lean_dec(x_33); +x_48 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_48, 0, x_42); +lean_ctor_set(x_48, 1, x_39); +lean_ctor_set(x_48, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_48); +lean_ctor_set(x_5, 2, x_42); +lean_ctor_set(x_5, 1, x_39); +lean_ctor_set(x_5, 0, x_42); +lean_ctor_set(x_2, 0, x_5); +x_49 = lean_apply_2(x_4, x_1, x_2); +return x_49; +} +} +else +{ +lean_object* x_50; lean_object* x_51; +lean_free_object(x_2); +lean_free_object(x_5); +lean_free_object(x_1); +lean_dec(x_8); +lean_dec(x_4); +x_50 = lean_ctor_get(x_42, 0); +lean_inc(x_50); +lean_dec(x_42); +x_51 = lean_apply_3(x_3, x_25, x_33, x_50); +return x_51; +} +} +else +{ +lean_object* x_52; +lean_dec(x_2); +x_52 = lean_ctor_get(x_33, 2); +lean_inc(x_52); +if (lean_obj_tag(x_52) == 0) +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + lean_ctor_release(x_33, 2); + x_53 = x_33; +} else { + lean_dec_ref(x_33); + x_53 = lean_box(0); +} +if (lean_is_scalar(x_53)) { + x_54 = lean_alloc_ctor(0, 3, 0); +} else { + x_54 = x_53; +} +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_39); +lean_ctor_set(x_54, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_54); +lean_ctor_set(x_5, 2, x_52); +lean_ctor_set(x_5, 1, x_39); +lean_ctor_set(x_5, 0, x_52); +x_55 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_55, 0, x_5); +x_56 = lean_apply_2(x_4, x_1, x_55); +return x_56; +} +else +{ +lean_object* x_57; lean_object* x_58; +lean_free_object(x_5); +lean_free_object(x_1); +lean_dec(x_8); +lean_dec(x_4); +x_57 = lean_ctor_get(x_52, 0); +lean_inc(x_57); +lean_dec(x_52); +x_58 = lean_apply_3(x_3, x_25, x_33, x_57); +return x_58; +} +} +} +else +{ +uint8_t x_59; +lean_dec(x_39); +lean_free_object(x_5); +lean_dec(x_25); +lean_dec(x_3); +x_59 = !lean_is_exclusive(x_33); +if (x_59 == 0) +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_60 = lean_ctor_get(x_33, 2); +lean_dec(x_60); +x_61 = lean_ctor_get(x_33, 1); +lean_dec(x_61); +x_62 = lean_ctor_get(x_33, 0); +lean_dec(x_62); +lean_ctor_set(x_33, 2, x_8); +lean_ctor_set(x_33, 1, x_7); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_33); +x_63 = lean_apply_2(x_4, x_1, x_2); +return x_63; +} +else +{ +lean_object* x_64; lean_object* x_65; +lean_dec(x_33); +x_64 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_64, 0, x_34); +lean_ctor_set(x_64, 1, x_7); +lean_ctor_set(x_64, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_64); +x_65 = lean_apply_2(x_4, x_1, x_2); +return x_65; +} +} +} +else +{ +lean_object* x_66; +lean_dec(x_5); +x_66 = lean_ctor_get(x_33, 1); +lean_inc(x_66); +if (lean_obj_tag(x_66) == 0) +{ +lean_object* x_67; lean_object* x_68; +if (lean_is_exclusive(x_2)) { + lean_ctor_release(x_2, 0); + x_67 = x_2; +} else { + lean_dec_ref(x_2); + x_67 = lean_box(0); +} +x_68 = lean_ctor_get(x_33, 2); +lean_inc(x_68); +if (lean_obj_tag(x_68) == 0) +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + lean_ctor_release(x_33, 2); + x_69 = x_33; +} else { + lean_dec_ref(x_33); + x_69 = lean_box(0); +} +if (lean_is_scalar(x_69)) { + x_70 = lean_alloc_ctor(0, 3, 0); +} else { + x_70 = x_69; +} +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_66); +lean_ctor_set(x_70, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_70); +x_71 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_71, 0, x_68); +lean_ctor_set(x_71, 1, x_66); +lean_ctor_set(x_71, 2, x_68); +if (lean_is_scalar(x_67)) { + x_72 = lean_alloc_ctor(1, 1, 0); +} else { + x_72 = x_67; +} +lean_ctor_set(x_72, 0, x_71); +x_73 = lean_apply_2(x_4, x_1, x_72); +return x_73; +} +else +{ +lean_object* x_74; lean_object* x_75; +lean_dec(x_67); +lean_free_object(x_1); +lean_dec(x_8); +lean_dec(x_4); +x_74 = lean_ctor_get(x_68, 0); +lean_inc(x_74); +lean_dec(x_68); +x_75 = lean_apply_3(x_3, x_25, x_33, x_74); +return x_75; +} +} +else +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; +lean_dec(x_66); +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + lean_ctor_release(x_33, 2); + x_76 = x_33; +} else { + lean_dec_ref(x_33); + x_76 = lean_box(0); +} +if (lean_is_scalar(x_76)) { + x_77 = lean_alloc_ctor(0, 3, 0); +} else { + x_77 = x_76; +} +lean_ctor_set(x_77, 0, x_34); +lean_ctor_set(x_77, 1, x_7); +lean_ctor_set(x_77, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_77); +x_78 = lean_apply_2(x_4, x_1, x_2); +return x_78; +} +} +} +else +{ +lean_object* x_79; +lean_dec(x_34); +lean_dec(x_33); +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_3); +lean_ctor_set(x_1, 1, x_26); +x_79 = lean_apply_2(x_4, x_1, x_2); +return x_79; +} +} +} +else +{ +lean_dec(x_1); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_80; lean_object* x_81; +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_3); +x_80 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_80, 0, x_5); +lean_ctor_set(x_80, 1, x_26); +x_81 = lean_apply_2(x_4, x_80, x_2); +return x_81; +} +else +{ +lean_object* x_82; lean_object* x_83; +x_82 = lean_ctor_get(x_2, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_82, 0); +lean_inc(x_83); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; +if (lean_is_exclusive(x_5)) { + lean_ctor_release(x_5, 0); + lean_ctor_release(x_5, 1); + lean_ctor_release(x_5, 2); + x_84 = x_5; +} else { + lean_dec_ref(x_5); + x_84 = lean_box(0); +} +x_85 = lean_ctor_get(x_82, 1); +lean_inc(x_85); +if (lean_obj_tag(x_85) == 0) +{ +lean_object* x_86; lean_object* x_87; +if (lean_is_exclusive(x_2)) { + lean_ctor_release(x_2, 0); + x_86 = x_2; +} else { + lean_dec_ref(x_2); + x_86 = lean_box(0); +} +x_87 = lean_ctor_get(x_82, 2); +lean_inc(x_87); +if (lean_obj_tag(x_87) == 0) +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_82)) { + lean_ctor_release(x_82, 0); + lean_ctor_release(x_82, 1); + lean_ctor_release(x_82, 2); + x_88 = x_82; +} else { + lean_dec_ref(x_82); + x_88 = lean_box(0); +} +if (lean_is_scalar(x_88)) { + x_89 = lean_alloc_ctor(0, 3, 0); +} else { + x_89 = x_88; +} +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_85); +lean_ctor_set(x_89, 2, x_8); +x_90 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_26); +if (lean_is_scalar(x_84)) { + x_91 = lean_alloc_ctor(0, 3, 0); +} else { + x_91 = x_84; +} +lean_ctor_set(x_91, 0, x_87); +lean_ctor_set(x_91, 1, x_85); +lean_ctor_set(x_91, 2, x_87); +if (lean_is_scalar(x_86)) { + x_92 = lean_alloc_ctor(1, 1, 0); +} else { + x_92 = x_86; +} +lean_ctor_set(x_92, 0, x_91); +x_93 = lean_apply_2(x_4, x_90, x_92); +return x_93; +} +else +{ +lean_object* x_94; lean_object* x_95; +lean_dec(x_86); +lean_dec(x_84); +lean_dec(x_8); +lean_dec(x_4); +x_94 = lean_ctor_get(x_87, 0); +lean_inc(x_94); +lean_dec(x_87); +x_95 = lean_apply_3(x_3, x_25, x_82, x_94); +return x_95; +} +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; +lean_dec(x_85); +lean_dec(x_84); +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_82)) { + lean_ctor_release(x_82, 0); + lean_ctor_release(x_82, 1); + lean_ctor_release(x_82, 2); + x_96 = x_82; +} else { + lean_dec_ref(x_82); + x_96 = lean_box(0); +} +if (lean_is_scalar(x_96)) { + x_97 = lean_alloc_ctor(0, 3, 0); +} else { + x_97 = x_96; +} +lean_ctor_set(x_97, 0, x_83); +lean_ctor_set(x_97, 1, x_7); +lean_ctor_set(x_97, 2, x_8); +x_98 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_98, 0, x_97); +lean_ctor_set(x_98, 1, x_26); +x_99 = lean_apply_2(x_4, x_98, x_2); +return x_99; +} +} +else +{ +lean_object* x_100; lean_object* x_101; +lean_dec(x_83); +lean_dec(x_82); +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_3); +x_100 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_100, 0, x_5); +lean_ctor_set(x_100, 1, x_26); +x_101 = lean_apply_2(x_4, x_100, x_2); +return x_101; +} +} +} +} +} +} +else +{ +lean_object* x_102; +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_3); +x_102 = lean_apply_2(x_4, x_1, x_2); +return x_102; +} +} +else +{ +lean_object* x_103; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_103 = lean_apply_2(x_4, x_1, x_2); +return x_103; +} +} +else +{ +lean_object* x_104; +lean_dec(x_3); +x_104 = lean_apply_2(x_4, x_1, x_2); +return x_104; +} +} +} +lean_object* l_Lean_Syntax_removeParen_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Syntax_removeParen_match__1___rarg), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Syntax_removeParen(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); +x_4 = l_myMacro____x40_Init_Notation___hyg_12262____closed__8; +x_5 = lean_name_eq(x_2, x_4); +if (x_5 == 0) +{ +lean_dec(x_3); +lean_dec(x_2); +return x_1; +} +else +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_1); +if (x_6 == 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; uint8_t x_14; +x_7 = lean_ctor_get(x_1, 1); +lean_dec(x_7); +x_8 = lean_ctor_get(x_1, 0); +lean_dec(x_8); +lean_inc(x_3); +x_9 = l_Lean_instInhabitedSyntax; +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_array_get(x_9, x_3, x_10); +x_12 = l_Lean_Syntax_getNumArgs(x_11); +x_13 = lean_unsigned_to_nat(2u); +x_14 = lean_nat_dec_eq(x_12, x_13); +lean_dec(x_12); +if (x_14 == 0) +{ +lean_dec(x_11); +lean_dec(x_3); +return x_1; +} +else +{ +lean_object* x_15; uint8_t x_16; +x_15 = l_Lean_Syntax_getArg(x_11, x_10); +x_16 = l_Lean_Syntax_isNone(x_15); +lean_dec(x_15); +if (x_16 == 0) +{ +lean_dec(x_11); +lean_dec(x_3); +return x_1; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_unsigned_to_nat(0u); +x_18 = l_Lean_Syntax_getArg(x_11, x_17); +lean_dec(x_11); +x_19 = lean_array_get(x_9, x_3, x_13); +lean_dec(x_3); +if (lean_obj_tag(x_19) == 2) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = l_Lean_Syntax_getTailInfo(x_18); +x_23 = lean_ctor_get(x_20, 0); +lean_inc(x_23); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; +x_24 = lean_ctor_get(x_20, 1); +lean_inc(x_24); +if (lean_obj_tag(x_24) == 0) +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_20, 2); +lean_inc(x_25); +lean_dec(x_20); +if (lean_obj_tag(x_25) == 0) +{ +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_18); +return x_1; +} +else +{ +lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +lean_dec(x_25); +x_27 = l_prec_x28___x29___closed__7; +x_28 = lean_string_dec_eq(x_21, x_27); +lean_dec(x_21); +if (x_28 == 0) +{ +lean_dec(x_26); +lean_dec(x_22); +lean_dec(x_18); +return x_1; +} +else +{ +if (lean_obj_tag(x_22) == 0) +{ +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +else +{ +lean_object* x_29; lean_object* x_30; +x_29 = lean_ctor_get(x_22, 0); +lean_inc(x_29); +lean_dec(x_22); +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +if (lean_obj_tag(x_31) == 0) +{ +uint8_t x_32; +x_32 = !lean_is_exclusive(x_29); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_29, 2); +x_34 = lean_ctor_get(x_29, 1); +lean_dec(x_34); +x_35 = lean_ctor_get(x_29, 0); +lean_dec(x_35); +if (lean_obj_tag(x_33) == 0) +{ +lean_free_object(x_29); +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +else +{ +uint8_t x_36; +lean_dec(x_1); +x_36 = !lean_is_exclusive(x_33); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; +x_37 = lean_ctor_get(x_33, 0); +x_38 = lean_ctor_get(x_37, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_37, 1); +lean_inc(x_39); +x_40 = lean_ctor_get(x_37, 2); +lean_inc(x_40); +lean_dec(x_37); +x_41 = lean_string_utf8_extract(x_38, x_39, x_40); +lean_dec(x_40); +lean_dec(x_39); +lean_dec(x_38); +x_42 = l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__2; +x_43 = lean_string_append(x_41, x_42); +x_44 = !lean_is_exclusive(x_26); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_45 = lean_ctor_get(x_26, 0); +x_46 = lean_ctor_get(x_26, 1); +x_47 = lean_ctor_get(x_26, 2); +x_48 = lean_string_utf8_extract(x_45, x_46, x_47); +lean_dec(x_47); +lean_dec(x_46); +lean_dec(x_45); +x_49 = lean_string_append(x_43, x_48); +lean_dec(x_48); +x_50 = lean_string_utf8_byte_size(x_49); +lean_ctor_set(x_26, 2, x_50); +lean_ctor_set(x_26, 1, x_17); +lean_ctor_set(x_26, 0, x_49); +lean_ctor_set(x_33, 0, x_26); +x_51 = l_Lean_Syntax_setTailInfo(x_18, x_29); +return x_51; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_52 = lean_ctor_get(x_26, 0); +x_53 = lean_ctor_get(x_26, 1); +x_54 = lean_ctor_get(x_26, 2); +lean_inc(x_54); +lean_inc(x_53); +lean_inc(x_52); +lean_dec(x_26); +x_55 = lean_string_utf8_extract(x_52, x_53, x_54); +lean_dec(x_54); +lean_dec(x_53); +lean_dec(x_52); +x_56 = lean_string_append(x_43, x_55); +lean_dec(x_55); +x_57 = lean_string_utf8_byte_size(x_56); +x_58 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_17); +lean_ctor_set(x_58, 2, x_57); +lean_ctor_set(x_33, 0, x_58); +x_59 = l_Lean_Syntax_setTailInfo(x_18, x_29); +return x_59; +} +} +else +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_60 = lean_ctor_get(x_33, 0); +lean_inc(x_60); +lean_dec(x_33); +x_61 = lean_ctor_get(x_60, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_60, 1); +lean_inc(x_62); +x_63 = lean_ctor_get(x_60, 2); +lean_inc(x_63); +lean_dec(x_60); +x_64 = lean_string_utf8_extract(x_61, x_62, x_63); +lean_dec(x_63); +lean_dec(x_62); +lean_dec(x_61); +x_65 = l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__2; +x_66 = lean_string_append(x_64, x_65); +x_67 = lean_ctor_get(x_26, 0); +lean_inc(x_67); +x_68 = lean_ctor_get(x_26, 1); +lean_inc(x_68); +x_69 = lean_ctor_get(x_26, 2); +lean_inc(x_69); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + lean_ctor_release(x_26, 2); + x_70 = x_26; +} else { + lean_dec_ref(x_26); + x_70 = lean_box(0); +} +x_71 = lean_string_utf8_extract(x_67, x_68, x_69); +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_67); +x_72 = lean_string_append(x_66, x_71); +lean_dec(x_71); +x_73 = lean_string_utf8_byte_size(x_72); +if (lean_is_scalar(x_70)) { + x_74 = lean_alloc_ctor(0, 3, 0); +} else { + x_74 = x_70; +} +lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_17); +lean_ctor_set(x_74, 2, x_73); +x_75 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_29, 2, x_75); +x_76 = l_Lean_Syntax_setTailInfo(x_18, x_29); +return x_76; +} +} +} +else +{ +lean_object* x_77; +x_77 = lean_ctor_get(x_29, 2); +lean_inc(x_77); +lean_dec(x_29); +if (lean_obj_tag(x_77) == 0) +{ +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +lean_dec(x_1); +x_78 = lean_ctor_get(x_77, 0); +lean_inc(x_78); +if (lean_is_exclusive(x_77)) { + lean_ctor_release(x_77, 0); + x_79 = x_77; +} else { + lean_dec_ref(x_77); + x_79 = lean_box(0); +} +x_80 = lean_ctor_get(x_78, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_78, 1); +lean_inc(x_81); +x_82 = lean_ctor_get(x_78, 2); +lean_inc(x_82); +lean_dec(x_78); +x_83 = lean_string_utf8_extract(x_80, x_81, x_82); +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_80); +x_84 = l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__2; +x_85 = lean_string_append(x_83, x_84); +x_86 = lean_ctor_get(x_26, 0); +lean_inc(x_86); +x_87 = lean_ctor_get(x_26, 1); +lean_inc(x_87); +x_88 = lean_ctor_get(x_26, 2); +lean_inc(x_88); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + lean_ctor_release(x_26, 2); + x_89 = x_26; +} else { + lean_dec_ref(x_26); + x_89 = lean_box(0); +} +x_90 = lean_string_utf8_extract(x_86, x_87, x_88); +lean_dec(x_88); +lean_dec(x_87); +lean_dec(x_86); +x_91 = lean_string_append(x_85, x_90); +lean_dec(x_90); +x_92 = lean_string_utf8_byte_size(x_91); +if (lean_is_scalar(x_89)) { + x_93 = lean_alloc_ctor(0, 3, 0); +} else { + x_93 = x_89; +} +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_17); +lean_ctor_set(x_93, 2, x_92); +if (lean_is_scalar(x_79)) { + x_94 = lean_alloc_ctor(1, 1, 0); +} else { + x_94 = x_79; +} +lean_ctor_set(x_94, 0, x_93); +x_95 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_95, 0, x_30); +lean_ctor_set(x_95, 1, x_31); +lean_ctor_set(x_95, 2, x_94); +x_96 = l_Lean_Syntax_setTailInfo(x_18, x_95); +return x_96; +} +} +} +else +{ +lean_dec(x_31); +lean_dec(x_29); +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +} +else +{ +lean_dec(x_30); +lean_dec(x_29); +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +} +} +} +} +else +{ +lean_dec(x_24); +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_18); +return x_1; +} +} +else +{ +lean_dec(x_23); +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_18); +return x_1; +} +} +else +{ +lean_dec(x_19); +lean_dec(x_18); +return x_1; +} +} +} +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; +lean_dec(x_1); +lean_inc(x_3); +x_97 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_97, 0, x_2); +lean_ctor_set(x_97, 1, x_3); +x_98 = l_Lean_instInhabitedSyntax; +x_99 = lean_unsigned_to_nat(1u); +x_100 = lean_array_get(x_98, x_3, x_99); +x_101 = l_Lean_Syntax_getNumArgs(x_100); +x_102 = lean_unsigned_to_nat(2u); +x_103 = lean_nat_dec_eq(x_101, x_102); +lean_dec(x_101); +if (x_103 == 0) +{ +lean_dec(x_100); +lean_dec(x_3); +return x_97; +} +else +{ +lean_object* x_104; uint8_t x_105; +x_104 = l_Lean_Syntax_getArg(x_100, x_99); +x_105 = l_Lean_Syntax_isNone(x_104); +lean_dec(x_104); +if (x_105 == 0) +{ +lean_dec(x_100); +lean_dec(x_3); +return x_97; +} +else +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; +x_106 = lean_unsigned_to_nat(0u); +x_107 = l_Lean_Syntax_getArg(x_100, x_106); +lean_dec(x_100); +x_108 = lean_array_get(x_98, x_3, x_102); +lean_dec(x_3); +if (lean_obj_tag(x_108) == 2) +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_109 = lean_ctor_get(x_108, 0); +lean_inc(x_109); +x_110 = lean_ctor_get(x_108, 1); +lean_inc(x_110); +lean_dec(x_108); +x_111 = l_Lean_Syntax_getTailInfo(x_107); +x_112 = lean_ctor_get(x_109, 0); +lean_inc(x_112); +if (lean_obj_tag(x_112) == 0) +{ +lean_object* x_113; +x_113 = lean_ctor_get(x_109, 1); +lean_inc(x_113); +if (lean_obj_tag(x_113) == 0) +{ +lean_object* x_114; +x_114 = lean_ctor_get(x_109, 2); +lean_inc(x_114); +lean_dec(x_109); +if (lean_obj_tag(x_114) == 0) +{ +lean_dec(x_111); +lean_dec(x_110); +lean_dec(x_107); +return x_97; +} +else +{ +lean_object* x_115; lean_object* x_116; uint8_t x_117; +x_115 = lean_ctor_get(x_114, 0); +lean_inc(x_115); +lean_dec(x_114); +x_116 = l_prec_x28___x29___closed__7; +x_117 = lean_string_dec_eq(x_110, x_116); +lean_dec(x_110); +if (x_117 == 0) +{ +lean_dec(x_115); +lean_dec(x_111); +lean_dec(x_107); +return x_97; +} +else +{ +if (lean_obj_tag(x_111) == 0) +{ +lean_dec(x_115); +lean_dec(x_107); +return x_97; +} +else +{ +lean_object* x_118; lean_object* x_119; +x_118 = lean_ctor_get(x_111, 0); +lean_inc(x_118); +lean_dec(x_111); +x_119 = lean_ctor_get(x_118, 0); +lean_inc(x_119); +if (lean_obj_tag(x_119) == 0) +{ +lean_object* x_120; +x_120 = lean_ctor_get(x_118, 1); +lean_inc(x_120); +if (lean_obj_tag(x_120) == 0) +{ +lean_object* x_121; lean_object* x_122; +x_121 = lean_ctor_get(x_118, 2); +lean_inc(x_121); +if (lean_is_exclusive(x_118)) { + lean_ctor_release(x_118, 0); + lean_ctor_release(x_118, 1); + lean_ctor_release(x_118, 2); + x_122 = x_118; +} else { + lean_dec_ref(x_118); + x_122 = lean_box(0); +} +if (lean_obj_tag(x_121) == 0) +{ +lean_dec(x_122); +lean_dec(x_115); +lean_dec(x_107); +return x_97; +} +else +{ +lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; +lean_dec(x_97); +x_123 = lean_ctor_get(x_121, 0); +lean_inc(x_123); +if (lean_is_exclusive(x_121)) { + lean_ctor_release(x_121, 0); + x_124 = x_121; +} else { + lean_dec_ref(x_121); + x_124 = lean_box(0); +} +x_125 = lean_ctor_get(x_123, 0); +lean_inc(x_125); +x_126 = lean_ctor_get(x_123, 1); +lean_inc(x_126); +x_127 = lean_ctor_get(x_123, 2); +lean_inc(x_127); +lean_dec(x_123); +x_128 = lean_string_utf8_extract(x_125, x_126, x_127); +lean_dec(x_127); +lean_dec(x_126); +lean_dec(x_125); +x_129 = l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__2; +x_130 = lean_string_append(x_128, x_129); +x_131 = lean_ctor_get(x_115, 0); +lean_inc(x_131); +x_132 = lean_ctor_get(x_115, 1); +lean_inc(x_132); +x_133 = lean_ctor_get(x_115, 2); +lean_inc(x_133); +if (lean_is_exclusive(x_115)) { + lean_ctor_release(x_115, 0); + lean_ctor_release(x_115, 1); + lean_ctor_release(x_115, 2); + x_134 = x_115; +} else { + lean_dec_ref(x_115); + x_134 = lean_box(0); +} +x_135 = lean_string_utf8_extract(x_131, x_132, x_133); +lean_dec(x_133); +lean_dec(x_132); +lean_dec(x_131); +x_136 = lean_string_append(x_130, x_135); +lean_dec(x_135); +x_137 = lean_string_utf8_byte_size(x_136); +if (lean_is_scalar(x_134)) { + x_138 = lean_alloc_ctor(0, 3, 0); +} else { + x_138 = x_134; +} +lean_ctor_set(x_138, 0, x_136); +lean_ctor_set(x_138, 1, x_106); +lean_ctor_set(x_138, 2, x_137); +if (lean_is_scalar(x_124)) { + x_139 = lean_alloc_ctor(1, 1, 0); +} else { + x_139 = x_124; +} +lean_ctor_set(x_139, 0, x_138); +if (lean_is_scalar(x_122)) { + x_140 = lean_alloc_ctor(0, 3, 0); +} else { + x_140 = x_122; +} +lean_ctor_set(x_140, 0, x_119); +lean_ctor_set(x_140, 1, x_120); +lean_ctor_set(x_140, 2, x_139); +x_141 = l_Lean_Syntax_setTailInfo(x_107, x_140); +return x_141; +} +} +else +{ +lean_dec(x_120); +lean_dec(x_118); +lean_dec(x_115); +lean_dec(x_107); +return x_97; +} +} +else +{ +lean_dec(x_119); +lean_dec(x_118); +lean_dec(x_115); +lean_dec(x_107); +return x_97; +} +} +} +} +} +else +{ +lean_dec(x_113); +lean_dec(x_111); +lean_dec(x_110); +lean_dec(x_109); +lean_dec(x_107); +return x_97; +} +} +else +{ +lean_dec(x_112); +lean_dec(x_111); +lean_dec(x_110); +lean_dec(x_109); +lean_dec(x_107); +return x_97; +} +} +else +{ +lean_dec(x_108); +lean_dec(x_107); +return x_97; +} +} +} +} +} +} +else +{ +return x_1; +} +} +} +lean_object* initialize_Init(lean_object*); +lean_object* initialize_Lean_Parser_Basic(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Lean_Parser_Transform(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Parser_Basic(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Lean/Server/FileSource.c b/stage0/stdlib/Lean/Server/FileSource.c index bbff597843..0c13199773 100644 --- a/stage0/stdlib/Lean/Server/FileSource.c +++ b/stage0/stdlib/Lean/Server/FileSource.c @@ -13,11 +13,16 @@ #ifdef __cplusplus extern "C" { #endif +lean_object* l_Lean_Lsp_DefinitionParams_hasFileSource___boxed(lean_object*); lean_object* l_Lean_Lsp_DocumentSymbolParams_hasFileSource___boxed(lean_object*); lean_object* l_Lean_Lsp_TextDocumentIdentifier_hasFileSource___boxed(lean_object*); +lean_object* l_Lean_Lsp_TypeDefinitionParams_hasFileSource___boxed(lean_object*); lean_object* l_Lean_Lsp_DidCloseTextDocumentParams_hasFileSource(lean_object*); lean_object* l_Lean_Lsp_DidChangeTextDocumentParams_hasFileSource(lean_object*); +lean_object* l_Lean_Lsp_DeclarationParams_hasFileSource___boxed(lean_object*); +lean_object* l_Lean_Lsp_DeclarationParams_hasFileSource(lean_object*); lean_object* l_Lean_Lsp_WaitForDiagnosticsParam_hasFileSource___boxed(lean_object*); +lean_object* l_Lean_Lsp_TypeDefinitionParams_hasFileSource(lean_object*); lean_object* l_Lean_Lsp_TextDocumentItem_hasFileSource___boxed(lean_object*); lean_object* l_Lean_Lsp_DidOpenTextDocumentParams_hasFileSource___boxed(lean_object*); lean_object* l_Lean_Lsp_HoverParams_hasFileSource___boxed(lean_object*); @@ -28,6 +33,7 @@ lean_object* l_Lean_Lsp_Location_hasFileSource(lean_object*); lean_object* l_Lean_Lsp_TextDocumentEdit_hasFileSource___boxed(lean_object*); lean_object* l_Lean_Lsp_TextDocumentPositionParams_hasFileSource___boxed(lean_object*); lean_object* l_Lean_Lsp_WaitForDiagnosticsParam_hasFileSource(lean_object*); +lean_object* l_Lean_Lsp_DefinitionParams_hasFileSource(lean_object*); lean_object* l_Lean_Lsp_DidChangeTextDocumentParams_hasFileSource___boxed(lean_object*); lean_object* l_Lean_Lsp_HoverParams_hasFileSource(lean_object*); lean_object* l_Lean_Lsp_TextDocumentIdentifier_hasFileSource(lean_object*); @@ -215,6 +221,60 @@ lean_dec(x_1); return x_2; } } +lean_object* l_Lean_Lsp_DeclarationParams_hasFileSource(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +return x_2; +} +} +lean_object* l_Lean_Lsp_DeclarationParams_hasFileSource___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Lsp_DeclarationParams_hasFileSource(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Lsp_DefinitionParams_hasFileSource(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +return x_2; +} +} +lean_object* l_Lean_Lsp_DefinitionParams_hasFileSource___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Lsp_DefinitionParams_hasFileSource(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Lsp_TypeDefinitionParams_hasFileSource(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +return x_2; +} +} +lean_object* l_Lean_Lsp_TypeDefinitionParams_hasFileSource___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Lsp_TypeDefinitionParams_hasFileSource(x_1); +lean_dec(x_1); +return x_2; +} +} lean_object* l_Lean_Lsp_WaitForDiagnosticsParam_hasFileSource(lean_object* x_1) { _start: { diff --git a/stage0/stdlib/Lean/Server/FileWorker.c b/stage0/stdlib/Lean/Server/FileWorker.c index e9c1446ade..769e190d6d 100644 --- a/stage0/stdlib/Lean/Server/FileWorker.c +++ b/stage0/stdlib/Lean/Server/FileWorker.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Server.FileWorker -// Imports: Init Init.System.IO Std.Data.RBMap Lean.Environment Lean.PrettyPrinter Lean.Data.Lsp Lean.Data.Json.FromToJson Lean.Server.Snapshots Lean.Server.Utils Lean.Server.AsyncList Lean.Server.InfoUtils +// Imports: Init Init.System.IO Std.Data.RBMap Lean.Environment Lean.PrettyPrinter Lean.DeclarationRange Lean.Data.Lsp Lean.Data.Json.FromToJson Lean.Server.Snapshots Lean.Server.Utils Lean.Server.AsyncList Lean.Server.InfoUtils #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -14,28 +14,26 @@ extern "C" { #endif lean_object* l_Std_PersistentArray_mapMAux___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MapDeclarationExtension_find_x3f___at_Lean_findDocString_x3f___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__3; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__1; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MapDeclarationExtension_find_x3f___at_Lean_findDeclarationRangesCore_x3f___spec__1(lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_isRecCore(lean_object*, lean_object*); lean_object* lean_string_push(lean_object*, uint32_t); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_Elab_TermInfo_pos_x3f(lean_object*); +lean_object* l_IO_FS_Handle_readToEnd_read___at_IO_Process_output___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_setBool(lean_object*, lean_object*, uint8_t); -lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initAndRunWorker___spec__6(lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); -extern lean_object* l_Lean_fieldIdxKind; lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__9; lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__5(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange_match__1(lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__8; lean_object* lean_get_stdin(lean_object*); -lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__3; lean_object* l_Std_PersistentArray_mapMAux___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__10(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); @@ -53,50 +51,52 @@ lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSna lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__2; +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Char_quote___closed__1; -lean_object* l_Lean_Server_FileWorker_handleDidOpen(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_erase___at_Lean_Server_FileWorker_handleCancelRequest___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__2; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getOptional_x3f(lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover___boxed(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__3; -uint8_t l_USize_decEq(size_t, size_t); lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3(lean_object*, lean_object*, lean_object*); lean_object* lean_io_error_to_string(lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4; -lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain_match__1___rarg(lean_object*); +lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_List_map___at_Lean_Server_FileWorker_handleDocumentSymbol___spec__1(lean_object*); lean_object* l_Array_append___rarg(lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__4; lean_object* l_String_split___at_Lean_stringToMessageData___spec__1(lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_noConfusionExt; extern lean_object* l_Std_Format_defWidth; lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__2___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1142____closed__5; -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_RequestError_fileChanged___closed__1; extern lean_object* l_Lean_Parser_Command_namedPrio___elambda__1___closed__2; extern lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4; lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); -uint8_t l_Array_anyMUnsafe_any___at_Lean_Server_FileWorker_handleHover___spec__4(lean_object*, lean_object*, size_t, size_t); extern lean_object* l_Lean_Lsp_Ipc_collectDiagnostics___closed__1; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__28; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__2___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_identKind___closed__2; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__6; +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__1(lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__4; extern lean_object* l_Lean_searchPathRef; uint8_t l_Lean_Syntax_structEq(lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_Format_join___closed__1; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_JsonNumber_toString(lean_object*); +lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__3; lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__4(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Lsp_instInhabitedRange___closed__1; @@ -107,39 +107,40 @@ lean_object* l_Lean_Server_FileWorker_handleNotification___closed__1; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__5; extern lean_object* l_Lean_Parser_Command_section___elambda__1___closed__2; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedEnvironment___closed__4; lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); -lean_object* l_Array_getMax_x3f___at_Lean_Server_FileWorker_handleHover___spec__6___boxed(lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; -lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange_match__2(lean_object*); lean_object* l_List_append___rarg(lean_object*, lean_object*); -lean_object* l_Array_contains___at_Lean_Server_FileWorker_handleHover___spec__3___boxed(lean_object*, lean_object*); lean_object* lean_get_stderr(lean_object*); -lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__6___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__3(lean_object*); -uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__1___boxed(lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__5; lean_object* l_Lean_getBuiltinSearchPath(lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__6___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest_match__1(lean_object*, lean_object*); +extern lean_object* l_Lean_declRangeExt; +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__2; lean_object* l_IO_FS_Stream_readLspMessage(lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__1; lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1; extern lean_object* l_instInhabitedNat; extern lean_object* l_IO_AsyncList_waitFind_x3f___rarg___closed__2; lean_object* l_Lean_Elab_headerToImports(lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_mkInputContext(lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); extern lean_object* l_Lean_Compiler_checkIsDefinition___closed__3; -lean_object* l_Lean_Server_FileWorker_compileDocument_match__3___rarg(lean_object*, lean_object*); +lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__1; lean_object* lean_string_append(lean_object*, lean_object*); -lean_object* l_Array_anyMUnsafe_any___at_Lean_Server_FileWorker_handleHover___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_interpolatedStrKind; +lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_List_getLast_x21___rarg___closed__2; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__12(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover_match__5(lean_object*); @@ -147,15 +148,18 @@ lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_FileMap_lspPosToUtf8Pos(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_Snapshot_toCmdState(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__4; lean_object* l_Lean_Server_FileWorker_handleHover_match__4(lean_object*); extern lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__13(lean_object*, size_t, size_t, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__11___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_Server_FileWorker_handleHover___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Server_FileWorker_handleHover___rarg___lambda__1(lean_object*, lean_object*); +lean_object* l_Lean_getConstInfo___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_ExceptT_lift___rarg___closed__1; -lean_object* l_Lean_Server_FileWorker_handleHover_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleHover_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__2; lean_object* l_IO_throwServerError___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__2; +lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_term___u2264_____closed__3; lean_object* lean_io_process_spawn(lean_object*, lean_object*); lean_object* lean_io_getenv(lean_object*, lean_object*); @@ -167,11 +171,10 @@ lean_object* l_Lean_Server_FileWorker_handleHover_match__3___rarg(lean_object*, uint8_t l_USize_decLt(size_t, size_t); lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedCancelToken; -extern lean_object* l_Lean_nameLitKind; +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__2(lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1142____closed__3; +extern lean_object* l_Lean_auxRecExt; lean_object* l_Lean_Server_FileWorker_workerMain_match__2(lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_handleHover_match__8(lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__3; lean_object* l_Lean_Server_FileWorker_CancelToken_new(lean_object*); lean_object* lean_io_map_task(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__1(lean_object*); @@ -184,66 +187,73 @@ lean_object* l_Lean_Elab_processHeader(lean_object*, lean_object*, lean_object*, lean_object* l_Lean_Server_FileWorker_parseParams___rarg___closed__1; extern lean_object* l_Lean_Elab_parseImports___closed__1; lean_object* l_IO_AsyncList_waitAll___rarg___lambda__1(lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker___closed__2; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__11(lean_object*, size_t, size_t, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap(lean_object*); +lean_object* l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_FileMap_utf8PosToLspPos(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover_match__2(lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument_match__2(lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___closed__1; +lean_object* l_Lean_Server_FileWorker_compileHeader(lean_object*, lean_object*, lean_object*); lean_object* lean_io_bind_task(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__1(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__10; lean_object* l_Lean_Server_FileWorker_queueRequest___lambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__5; +lean_object* l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__4(lean_object*, size_t, size_t, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__4; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__6; lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2(lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain_match__2___boxed(lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_handleHover_match__6___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleHover_match__6___rarg(lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__3___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleNotification___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__4; +lean_object* l_Lean_isRec___at_Lean_Server_FileWorker_handleDefinition___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_toStructured_x3f___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__8(lean_object*); lean_object* l_IO_getStdin___at_Lean_Server_FileWorker_workerMain___spec__1(lean_object*); lean_object* lean_io_as_task(lean_object*, lean_object*, lean_object*); +lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__9___boxed__const__1; -lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___closed__2; +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__5(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2; lean_object* l_Std_RBNode_setBlack___rarg(lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_List_get_x21___rarg___closed__4; -lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonHover____x40_Lean_Data_Lsp_LanguageFeatures___hyg_11_(lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain_match__3(lean_object*); -lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleHover___spec__5(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_appDir___at_Lean_Server_FileWorker_compileDocument___spec__3___boxed(lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mainLoop___closed__1; lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__1___rarg(lean_object*, lean_object*); -lean_object* l_IO_realPath___at_Lean_Server_FileWorker_compileDocument___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleCancelRequest___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_initialize___elambda__1___closed__1; -lean_object* l_Lean_Server_FileWorker_handleHover_match__7___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_parseAhead(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___boxed(lean_object*, lean_object*); lean_object* l_Lean_Json_compress(lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_exit___elambda__1___closed__1; -extern lean_object* l_Lean_numLitKind; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2; lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1; lean_object* l_Lean_Server_FileWorker_updateDocument_match__2(lean_object*); lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_check(lean_object*); +lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocationLink____x40_Lean_Data_Lsp_Basic___hyg_584_(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__1(lean_object*, lean_object*); extern lean_object* l_Task_Priority_dedicated; lean_object* l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__2; @@ -256,55 +266,57 @@ lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___l lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__2(lean_object*, lean_object*, lean_object*); lean_object* lean_get_set_stderr(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_RequestError_fileChanged; -lean_object* l_Lean_Server_FileWorker_handleHover_match__6(lean_object*); -lean_object* l_Lean_Server_FileWorker_handleHover_match__4___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleHover_match__6(lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleHover_match__4___rarg(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_FileWorker_workerMain___spec__2(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_strLitKind; lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__2; +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_reparseHeader(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__7; +lean_object* l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader_match__4(lean_object*); lean_object* l_IO_AsyncList_append___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getHeadInfo(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__9; extern lean_object* l_IO_FS_Stream_readLspNotificationAs___closed__1; +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__5___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_insert___at_Lean_Server_FileWorker_queueRequest___spec__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__4; +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg(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___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent(lean_object*, lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readRequestAs___closed__3; -lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleHover___spec__7(lean_object*, size_t, size_t, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleHover_match__6___boxed(lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__4; lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__3; lean_object* l_ST_Prim_Ref_get___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern uint8_t l_Lean_expandExternPatternAux___closed__2; lean_object* l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__1; -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__1; +lean_object* l_Lean_Server_FileWorker_handleDefinition___closed__2; lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_io_realpath(lean_object*, lean_object*); lean_object* l_Std_RBNode_appendTrees___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkState(lean_object*, lean_object*, lean_object*); -lean_object* l_System_FilePath_dirName(lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1; -lean_object* l_Lean_Server_FileWorker_handleHover_match__10(lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_getMax_x3f___at_Lean_Server_FileWorker_handleHover___spec__6(lean_object*); extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__2; +lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker___closed__1; lean_object* l_Std_RBNode_balRight___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Std_RBNode_isBlack___rarg(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__8; +lean_object* l_Lean_Server_FileWorker_handleDefinition___closed__1; lean_object* l_IO_AsyncList_unfoldAsync___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__1(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Init_Util_0__mkPanicMessage___closed__2; extern lean_object* l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; -lean_object* l_IO_FS_Handle_getLine___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain_match__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__1; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* lean_task_map(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_repr(lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__2; lean_object* l_List_getLast_x21___at_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols___spec__1(lean_object*); lean_object* l_Lean_Server_FileWorker_mapTask(lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readRequestAs___closed__5; @@ -316,62 +328,63 @@ lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__3(lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getId(lean_object*); -lean_object* l_Lean_Server_FileWorker_handleHover_match__10___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__2(lean_object*); lean_object* lean_format_pretty(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1; -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_charLitKind; lean_object* l_Lean_Server_FileWorker_queueRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__3; lean_object* l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mainLoop_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__1; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_SearchPath_findWithExt(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams(lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_IO_AsyncList_waitAll___rarg___closed__1; lean_object* l_IO_FS_Stream_readLspNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_array_to_list(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange___closed__1; -lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleHover___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_handleHover_match__9(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParam____x40_Lean_Data_Lsp_Extra___hyg_32_(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange___closed__2; +lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__9(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mapTask___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mapTask___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__5; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__1; -lean_object* l_Lean_Server_FileWorker_handleHover_match__7(lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover_match__5___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_appDir___at_Lean_getBuiltinSearchPath___spec__1(lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__2___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_docStringExt; -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__3; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125_(lean_object*); +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239_(lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams_match__1(lean_object*, lean_object*); -lean_object* l_IO_getEnv___at_Lean_Server_FileWorker_compileDocument___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1(lean_object*); extern lean_object* l_Lean_Parser_instInhabitedModuleParserState___closed__1; lean_object* l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__2___boxed__const__1; -lean_object* l_IO_appPath___at_Lean_Server_FileWorker_compileDocument___spec__4(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonCancelParams____x40_Lean_Data_Lsp_Basic___hyg_84_(lean_object*); lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*); lean_object* l_List_takeWhile___rarg(lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__2; lean_object* l_Lean_Meta_ppExpr___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_realPathNormalized(lean_object*, lean_object*); uint8_t l_Array_isEmpty___rarg(lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_895_(lean_object*); -lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updatePendingRequests___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedSyntax; extern lean_object* l_Lean_mkEmptyEnvironment___lambda__1___closed__1; extern lean_object* l_Lean_Unhygienic_run___rarg___closed__2; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__2(lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader_match__4___rarg(lean_object*, lean_object*); extern lean_object* l_IO_AsyncList_waitFind_x3f___rarg___closed__1; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__44; lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; @@ -380,7 +393,6 @@ extern lean_object* l_Lean_Server_Snapshots_instInhabitedSnapshot; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__5(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_Std_RBNode_balLeft___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___closed__1; -lean_object* l_Lean_Server_FileWorker_compileDocument___closed__3; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__2(lean_object*); extern lean_object* l_Lean_Lsp_instToJsonWaitForDiagnostics___closed__1; lean_object* l_Lean_Server_FileWorker_mainLoop(lean_object*, lean_object*); @@ -390,25 +402,24 @@ lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lea lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__2___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_rangeOfSyntax(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Handle_readToEnd_read___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__3(lean_object*); size_t lean_usize_of_nat(lean_object*); extern lean_object* l_Lean_nullKind___closed__1; +lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_match__1(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__5(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__1(lean_object*); +lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__9(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleNotification_match__1(lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_CancelToken_new___spec__1(uint8_t, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__3; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_ofList___rarg(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__36; +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap_match__1(lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__1(size_t, size_t, lean_object*); +lean_object* l_Lean_Server_FileWorker_initializeWorker_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1(lean_object*, lean_object*, uint8_t); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_nullKind___closed__2; extern lean_object* l_IO_FS_Stream_readNotificationAs___closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest___closed__1; @@ -416,21 +427,21 @@ lean_object* l_Lean_Server_Snapshots_parseNextCmd(lean_object*, lean_object*, le lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__2(lean_object*); extern lean_object* l_Lean_Server_instInhabitedDocumentMeta___closed__1; lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__2; +lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__9___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_initializeWorker(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__3; +lean_object* l_Lean_Server_FileWorker_handleHover___rarg___closed__1; lean_object* l_Std_PersistentArray_mapMAux___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__10___boxed__const__1; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__7; extern lean_object* l_Lean_instInhabitedNameGenerator___closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_drop___rarg(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__5; lean_object* l_Lean_Syntax_isIdOrAtom_x3f(lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__5; lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_identKind; lean_object* lean_io_file_exists(lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instCoeErrorElabTaskError(lean_object*); lean_object* l_IO_AsyncList_updateFinishedPrefix___rarg(lean_object*, lean_object*); extern lean_object* l_Option_get_x21___rarg___closed__4; @@ -443,69 +454,77 @@ lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocument lean_object* l_List_redLength___rarg(lean_object*); lean_object* l_Std_PersistentArray_push___rarg(lean_object*, lean_object*); extern lean_object* l_List_partition___rarg___closed__1; +lean_object* l_Lean_Server_FileWorker_handleDefinition___lambda__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__2(lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3377____closed__31; +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__3(lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_server_worker_main(lean_object*); -lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__6(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_handleHover_match__8___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover_match__1(lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_queueRequest(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader_match__2(lean_object*); lean_object* l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__2(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_scientificLitKind; +lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_msgToDiagnostic(lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_finishedPrefix___rarg(lean_object*); -uint8_t l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1(lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1142____closed__7; -lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__12; -lean_object* l_IO_appDir___at_Lean_Server_FileWorker_compileDocument___spec__3(lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1; extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3377____closed__28; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__3___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__8; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument; lean_object* lean_io_process_child_wait(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument___closed__2; +lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2; lean_object* l_Lean_getMaxRecDepth(lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain_match__2___rarg(lean_object*); uint8_t l_Std_RBNode_isRed___rarg(lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__1; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___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*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__32; lean_object* l_Std_PersistentArray_toArray___rarg(lean_object*); lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* l_Std_PersistentArray_mapMAux___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__3___boxed__const__1; lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1; lean_object* l_Lean_Server_FileWorker_handleHover_match__2___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument___closed__1; -lean_object* l_Lean_Syntax_getKind(lean_object*); lean_object* l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__20; -lean_object* l_IO_FS_Handle_getLine___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_unfoldAsync_step___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__3(lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__6; lean_object* l_Lean_Server_FileWorker_initAndRunWorker___closed__3; lean_object* l_Lean_Server_FileWorker_workerMain_match__1(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1; +lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4; lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2___boxed(lean_object*); lean_object* l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(lean_object*, lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___closed__1; +lean_object* l_Lean_addSearchPathFromEnv(lean_object*, lean_object*); lean_object* lean_get_stdout(lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3; -lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___boxed(lean_object*, lean_object*); +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Communication_0__IO_FS_Stream_readLspHeader(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument_match__2___rarg(lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__4; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__40; +lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_isRec___at_Lean_Server_FileWorker_handleDefinition___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__2___rarg(lean_object*, lean_object*); @@ -513,147 +532,155 @@ lean_object* l_Lean_Server_FileWorker_parseParams___rarg___boxed(lean_object*, l lean_object* l_Lean_Json_mkObj(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__11; lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__4; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readRequestAs___closed__2; lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1; -lean_object* l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1142____closed__1; +lean_object* l_Lean_Name_getPrefix(lean_object*); lean_object* l_IO_FS_Stream_readNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_Snapshot_endPos(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__8; -lean_object* l_Lean_Server_FileWorker_compileDocument_match__3(lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader_match__3(lean_object*); +lean_object* l_Lean_Server_FileWorker_initializeWorker_match__1___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_instInhabitedName; extern lean_object* l_IO_FS_Stream_readRequestAs___closed__1; lean_object* l_Lean_Server_FileWorker_mainLoop_match__1(lean_object*); extern lean_object* l_Lean_JsonRpc_instToStringRequestID___closed__1; +lean_object* l_Lean_Expr_constName_x3f(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_Lean_Environment_getModuleIdxFor_x3f(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___boxed(lean_object*); lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); extern lean_object* l_IO_FS_Stream_readLspRequestAs___closed__1; lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initAndRunWorker___spec__5(lean_object*, lean_object*); -lean_object* l_Lean_parseSearchPath(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__5___rarg(lean_object*, lean_object*); +lean_object* l_Lean_parseSearchPath(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mainLoop_match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleHover___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_String_trim(lean_object*); lean_object* l_List_dropLast___rarg(lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Environment_allImportedModuleNames(lean_object*); extern lean_object* l_IO_FS_Stream_readRequestAs___closed__4; +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__6(lean_object*); uint8_t l_Lean_Server_FileWorker_updateDocument___lambda__1(lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader_match__3___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_foldDocumentChanges(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_rangeOfSyntax___boxed(lean_object*, lean_object*); -lean_object* l_IO_appPath___at_Lean_Server_FileWorker_compileDocument___spec__4___rarg(lean_object*); -lean_object* l_IO_fileExists___at_Lean_Server_FileWorker_compileDocument___spec__2___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__2___closed__1; +uint8_t l_Lean_TagDeclarationExtension_isTagged(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_withPrefix(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__4(lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument_match__2___rarg(lean_object*, lean_object*); lean_object* l_IO_ofExcept___at_IO_Process_output___spec__5(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2; lean_object* l_Lean_Server_Snapshots_Snapshot_msgLog(lean_object*); -lean_object* l_IO_getEnv___at_Lean_Server_FileWorker_compileDocument___spec__1___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_HashMap_instInhabitedHashMap___closed__1; lean_object* l_Lean_Server_FileWorker_handleDidChange(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_set___boxed(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getTailPos(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__4; +lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5; lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics(lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__1; -lean_object* lean_string_length(lean_object*); lean_object* l_Lean_Server_FileWorker_updatePendingRequests(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__3___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover_match__3(lean_object*); lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__6(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_set(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__2; -lean_object* l_IO_realPath___at_Lean_Server_FileWorker_compileDocument___spec__5___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__6; extern lean_object* l_Lean_mkOptionalNode___closed__2; +lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3; lean_object* l_Lean_Server_maybeTee(lean_object*, uint8_t, lean_object*, lean_object*); -lean_object* lean_io_app_dir(lean_object*); -lean_object* l_Lean_Elab_InfoTree_smallestNodes(lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader___closed__3; lean_object* l_Lean_Server_FileWorker_updateDocument___closed__1; lean_object* l_Lean_Server_FileWorker_parseParams___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleNotification_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg(lean_object*, lean_object*); -lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_handleHover___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_TermInfo_tailPos_x3f(lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument_match__1(lean_object*); -uint8_t l_Array_contains___at_Lean_Server_FileWorker_handleHover___spec__3(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain___closed__1; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__13; +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_CancelToken_new___spec__1___boxed(lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mainLoop_match__2(lean_object*); extern lean_object* l_System_FilePath_exeSuffix; lean_object* l_List_lengthAux___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__3___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_fileExists___at_Lean_Server_FileWorker_compileDocument___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__2; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_309_(lean_object*); -lean_object* l_IO_FS_Handle_readToEnd_read___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__7(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__12; +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocument___spec__1(lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain___boxed__const__1; lean_object* l_Lean_Json_getObjVal_x3f(lean_object*, lean_object*); lean_object* l_Lean_Elab_ContextInfo_runMetaM___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__9; -lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_handleHover___spec__2(lean_object*); +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__2; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols(lean_object*, lean_object*); +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__5(size_t, size_t, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___boxed(lean_object*, lean_object*); lean_object* lean_task_pure(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__1; lean_object* l_Lean_Server_FileWorker_updateDocument_match__1(lean_object*); -lean_object* l_Lean_Server_FileWorker_compileDocument_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__7___boxed(lean_object*, lean_object*); lean_object* lean_nat_to_int(lean_object*); +lean_object* l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__7___rarg(lean_object*); lean_object* l_Lean_Server_FileWorker_handleCancelRequest(lean_object*, lean_object*, lean_object*); lean_object* lean_task_get_own(lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__6(lean_object*, size_t, size_t, lean_object*, lean_object*); -extern lean_object* l___private_Lean_MonadEnv_0__Lean_supportedRecursors___closed__14; extern lean_object* l_Array_findSomeM_x3f___rarg___closed__1; lean_object* l_Lean_Syntax_reprint(lean_object*); -lean_object* l_Lean_Server_FileWorker_handleHover_match__9___rarg(lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__4(lean_object*); lean_object* l_List_getLast___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1; -lean_object* l_IO_appPath___at_Lean_Server_FileWorker_compileDocument___spec__4___boxed(lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_compileHeader_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2; lean_object* l_List_getLastD___rarg(lean_object*, lean_object*); -extern lean_object* l_Lean_interpolatedStrLitKind; uint8_t l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__4___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_compileNextCmd(lean_object*, lean_object*, lean_object*); extern lean_object* l_term_x5b___x5d___closed__3; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_FileWorker_handleHover_match__9___boxed(lean_object*, lean_object*); +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__9(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedSourceInfo; -lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1142____closed__23; extern lean_object* l_Lean_Parser_Command_attribute___elambda__1___closed__5; lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg(lean_object*, lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); +lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_withWaitFindSnap___spec__2(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_instInhabitedInfoState___closed__1; extern lean_object* l_Lean_Parser_Command_instance___elambda__1___closed__6; -lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_handleHover___spec__1___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__1(lean_object*); static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent___closed__1() { @@ -978,48 +1005,6 @@ x_1 = l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__5; return x_1; } } -lean_object* l_Lean_Server_FileWorker_updatePendingRequests(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_4 = lean_ctor_get(x_2, 4); -x_5 = lean_st_ref_take(x_4, x_3); -x_6 = lean_ctor_get(x_5, 0); -lean_inc(x_6); -x_7 = lean_ctor_get(x_5, 1); -lean_inc(x_7); -lean_dec(x_5); -x_8 = lean_apply_1(x_1, x_6); -x_9 = lean_st_ref_set(x_4, x_8, x_7); -x_10 = !lean_is_exclusive(x_9); -if (x_10 == 0) -{ -return x_9; -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = lean_ctor_get(x_9, 0); -x_12 = lean_ctor_get(x_9, 1); -lean_inc(x_12); -lean_inc(x_11); -lean_dec(x_9); -x_13 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_13, 0, x_11); -lean_ctor_set(x_13, 1, x_12); -return x_13; -} -} -} -lean_object* l_Lean_Server_FileWorker_updatePendingRequests___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Server_FileWorker_updatePendingRequests(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_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -1063,65 +1048,65 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_4; lean_object* x_5; uint8_t x_6; -x_4 = lean_st_ref_get(x_1, x_3); -x_5 = lean_ctor_get(x_4, 0); -lean_inc(x_5); -x_6 = lean_unbox(x_5); -lean_dec(x_5); +lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_3 = lean_st_ref_get(x_1, x_2); +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +x_5 = lean_unbox(x_4); +lean_dec(x_4); +if (x_5 == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_3); if (x_6 == 0) { -uint8_t x_7; -x_7 = !lean_is_exclusive(x_4); -if (x_7 == 0) -{ -lean_object* x_8; lean_object* x_9; -x_8 = lean_ctor_get(x_4, 0); -lean_dec(x_8); -x_9 = l_Lean_Compiler_checkIsDefinition___closed__3; -lean_ctor_set(x_4, 0, x_9); -return x_4; +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_3, 0); +lean_dec(x_7); +x_8 = l_Lean_Compiler_checkIsDefinition___closed__3; +lean_ctor_set(x_3, 0, x_8); +return x_3; } else { -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_4, 1); -lean_inc(x_10); -lean_dec(x_4); -x_11 = l_Lean_Compiler_checkIsDefinition___closed__3; -x_12 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_12, 0, x_11); -lean_ctor_set(x_12, 1, x_10); -return x_12; +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_3, 1); +lean_inc(x_9); +lean_dec(x_3); +x_10 = l_Lean_Compiler_checkIsDefinition___closed__3; +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 { -uint8_t x_13; -x_13 = !lean_is_exclusive(x_4); -if (x_13 == 0) +uint8_t x_12; +x_12 = !lean_is_exclusive(x_3); +if (x_12 == 0) { -lean_object* x_14; lean_object* x_15; -x_14 = lean_ctor_get(x_4, 0); -lean_dec(x_14); -x_15 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1; -lean_ctor_set(x_4, 0, x_15); -return x_4; +lean_object* x_13; lean_object* x_14; +x_13 = lean_ctor_get(x_3, 0); +lean_dec(x_13); +x_14 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1; +lean_ctor_set(x_3, 0, x_14); +return x_3; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_4, 1); -lean_inc(x_16); -lean_dec(x_4); -x_17 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1; -x_18 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_16); -return x_18; +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_3, 1); +lean_inc(x_15); +lean_dec(x_3); +x_16 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1; +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_15); +return x_17; } } } @@ -2715,7 +2700,7 @@ lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCm _start: { lean_object* x_6; lean_object* x_7; -x_6 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(x_3, x_4, x_5); +x_6 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(x_3, x_5); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); if (lean_obj_tag(x_7) == 0) @@ -2795,7 +2780,7 @@ lean_inc(x_24); x_25 = lean_ctor_get(x_23, 1); lean_inc(x_25); lean_dec(x_23); -x_26 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(x_3, x_4, x_25); +x_26 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(x_3, x_25); x_27 = lean_ctor_get(x_26, 0); lean_inc(x_27); if (lean_obj_tag(x_27) == 0) @@ -2895,217 +2880,211 @@ x_51 = l_Std_PersistentArray_push___rarg(x_50, x_49); x_52 = l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__2(x_1, x_51, x_40); if (lean_obj_tag(x_52) == 0) { -lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; x_53 = lean_ctor_get(x_52, 0); lean_inc(x_53); x_54 = lean_ctor_get(x_52, 1); lean_inc(x_54); lean_dec(x_52); -x_55 = lean_ctor_get(x_4, 1); -lean_inc(x_55); -lean_dec(x_4); -x_56 = lean_nat_to_int(x_20); -x_57 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_57, 0, x_56); -x_58 = l_Std_PersistentArray_toArray___rarg(x_53); +x_55 = lean_nat_to_int(x_20); +x_56 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_56, 0, x_55); +x_57 = l_Std_PersistentArray_toArray___rarg(x_53); lean_dec(x_53); -x_59 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_59, 0, x_19); -lean_ctor_set(x_59, 1, x_57); -lean_ctor_set(x_59, 2, x_58); -x_60 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; -x_61 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_61, 0, x_60); -lean_ctor_set(x_61, 1, x_59); -x_62 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_55, x_61, x_54); -if (lean_obj_tag(x_62) == 0) +x_58 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_58, 0, x_19); +lean_ctor_set(x_58, 1, x_56); +lean_ctor_set(x_58, 2, x_57); +x_59 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_58); +x_61 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_4, x_60, x_54); +if (lean_obj_tag(x_61) == 0) { -uint8_t x_63; -x_63 = !lean_is_exclusive(x_62); -if (x_63 == 0) +uint8_t x_62; +x_62 = !lean_is_exclusive(x_61); +if (x_62 == 0) { -lean_object* x_64; -x_64 = lean_ctor_get(x_62, 0); -lean_dec(x_64); +lean_object* x_63; +x_63 = lean_ctor_get(x_61, 0); +lean_dec(x_63); lean_ctor_set(x_27, 0, x_41); -lean_ctor_set(x_62, 0, x_27); -return x_62; +lean_ctor_set(x_61, 0, x_27); +return x_61; } else { -lean_object* x_65; lean_object* x_66; -x_65 = lean_ctor_get(x_62, 1); -lean_inc(x_65); -lean_dec(x_62); +lean_object* x_64; lean_object* x_65; +x_64 = lean_ctor_get(x_61, 1); +lean_inc(x_64); +lean_dec(x_61); lean_ctor_set(x_27, 0, x_41); -x_66 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_66, 0, x_27); -lean_ctor_set(x_66, 1, x_65); -return x_66; +x_65 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_65, 0, x_27); +lean_ctor_set(x_65, 1, x_64); +return x_65; } } else { -uint8_t x_67; +uint8_t x_66; lean_dec(x_41); lean_free_object(x_27); -x_67 = !lean_is_exclusive(x_62); -if (x_67 == 0) +x_66 = !lean_is_exclusive(x_61); +if (x_66 == 0) { -return x_62; +return x_61; } else { -lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_68 = lean_ctor_get(x_62, 0); -x_69 = lean_ctor_get(x_62, 1); -lean_inc(x_69); +lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_67 = lean_ctor_get(x_61, 0); +x_68 = lean_ctor_get(x_61, 1); lean_inc(x_68); -lean_dec(x_62); -x_70 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_70, 0, x_68); -lean_ctor_set(x_70, 1, x_69); -return x_70; +lean_inc(x_67); +lean_dec(x_61); +x_69 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_69, 0, x_67); +lean_ctor_set(x_69, 1, x_68); +return x_69; } } } else { -uint8_t x_71; +uint8_t x_70; lean_dec(x_41); lean_free_object(x_27); lean_dec(x_20); lean_dec(x_19); lean_dec(x_4); -x_71 = !lean_is_exclusive(x_52); -if (x_71 == 0) +x_70 = !lean_is_exclusive(x_52); +if (x_70 == 0) { return x_52; } else { -lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_72 = lean_ctor_get(x_52, 0); -x_73 = lean_ctor_get(x_52, 1); -lean_inc(x_73); +lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_71 = lean_ctor_get(x_52, 0); +x_72 = lean_ctor_get(x_52, 1); lean_inc(x_72); +lean_inc(x_71); lean_dec(x_52); -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; +x_73 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_73, 0, x_71); +lean_ctor_set(x_73, 1, x_72); +return x_73; } } } else { -lean_object* x_75; lean_object* x_76; lean_object* x_77; +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_free_object(x_27); lean_dec(x_21); -x_75 = lean_ctor_get(x_26, 1); -lean_inc(x_75); +x_74 = lean_ctor_get(x_26, 1); +lean_inc(x_74); lean_dec(x_26); -x_76 = lean_ctor_get(x_24, 0); -lean_inc(x_76); +x_75 = lean_ctor_get(x_24, 0); +lean_inc(x_75); lean_dec(x_24); -x_77 = l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__9(x_1, x_76, x_75); -if (lean_obj_tag(x_77) == 0) +x_76 = l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__9(x_1, x_75, x_74); +if (lean_obj_tag(x_76) == 0) { -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_78 = lean_ctor_get(x_77, 0); +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_77 = lean_ctor_get(x_76, 0); +lean_inc(x_77); +x_78 = lean_ctor_get(x_76, 1); lean_inc(x_78); -x_79 = lean_ctor_get(x_77, 1); -lean_inc(x_79); +lean_dec(x_76); +x_79 = lean_nat_to_int(x_20); +x_80 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_80, 0, x_79); +x_81 = l_Std_PersistentArray_toArray___rarg(x_77); lean_dec(x_77); -x_80 = lean_ctor_get(x_4, 1); -lean_inc(x_80); -lean_dec(x_4); -x_81 = lean_nat_to_int(x_20); -x_82 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_82, 0, x_81); -x_83 = l_Std_PersistentArray_toArray___rarg(x_78); -lean_dec(x_78); -x_84 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_84, 0, x_19); +x_82 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_82, 0, x_19); +lean_ctor_set(x_82, 1, x_80); +lean_ctor_set(x_82, 2, x_81); +x_83 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; +x_84 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_84, 0, x_83); lean_ctor_set(x_84, 1, x_82); -lean_ctor_set(x_84, 2, x_83); -x_85 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; -x_86 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_86, 0, x_85); -lean_ctor_set(x_86, 1, x_84); -x_87 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_80, x_86, x_79); -if (lean_obj_tag(x_87) == 0) +x_85 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_4, x_84, x_78); +if (lean_obj_tag(x_85) == 0) { -uint8_t x_88; -x_88 = !lean_is_exclusive(x_87); -if (x_88 == 0) +uint8_t x_86; +x_86 = !lean_is_exclusive(x_85); +if (x_86 == 0) { -lean_object* x_89; lean_object* x_90; -x_89 = lean_ctor_get(x_87, 0); -lean_dec(x_89); +lean_object* x_87; lean_object* x_88; +x_87 = lean_ctor_get(x_85, 0); +lean_dec(x_87); +x_88 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; +lean_ctor_set(x_85, 0, x_88); +return x_85; +} +else +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_89 = lean_ctor_get(x_85, 1); +lean_inc(x_89); +lean_dec(x_85); x_90 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; -lean_ctor_set(x_87, 0, x_90); -return x_87; -} -else -{ -lean_object* x_91; lean_object* x_92; lean_object* x_93; -x_91 = lean_ctor_get(x_87, 1); -lean_inc(x_91); -lean_dec(x_87); -x_92 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; -x_93 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_93, 0, x_92); -lean_ctor_set(x_93, 1, x_91); -return x_93; +x_91 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_91, 0, x_90); +lean_ctor_set(x_91, 1, x_89); +return x_91; } } else { -uint8_t x_94; -x_94 = !lean_is_exclusive(x_87); -if (x_94 == 0) +uint8_t x_92; +x_92 = !lean_is_exclusive(x_85); +if (x_92 == 0) { -return x_87; +return x_85; } else { -lean_object* x_95; lean_object* x_96; lean_object* x_97; -x_95 = lean_ctor_get(x_87, 0); -x_96 = lean_ctor_get(x_87, 1); -lean_inc(x_96); -lean_inc(x_95); -lean_dec(x_87); -x_97 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_97, 0, x_95); -lean_ctor_set(x_97, 1, x_96); -return x_97; +lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_93 = lean_ctor_get(x_85, 0); +x_94 = lean_ctor_get(x_85, 1); +lean_inc(x_94); +lean_inc(x_93); +lean_dec(x_85); +x_95 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_95, 0, x_93); +lean_ctor_set(x_95, 1, x_94); +return x_95; } } } else { -uint8_t x_98; +uint8_t x_96; lean_dec(x_20); lean_dec(x_19); lean_dec(x_4); -x_98 = !lean_is_exclusive(x_77); -if (x_98 == 0) +x_96 = !lean_is_exclusive(x_76); +if (x_96 == 0) { -return x_77; +return x_76; } else { -lean_object* x_99; lean_object* x_100; lean_object* x_101; -x_99 = lean_ctor_get(x_77, 0); -x_100 = lean_ctor_get(x_77, 1); -lean_inc(x_100); -lean_inc(x_99); -lean_dec(x_77); -x_101 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_101, 0, x_99); -lean_ctor_set(x_101, 1, x_100); -return x_101; +lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_97 = lean_ctor_get(x_76, 0); +x_98 = lean_ctor_get(x_76, 1); +lean_inc(x_98); +lean_inc(x_97); +lean_dec(x_76); +x_99 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_99, 0, x_97); +lean_ctor_set(x_99, 1, x_98); +return x_99; } } } @@ -3115,207 +3094,229 @@ else lean_dec(x_27); if (lean_obj_tag(x_24) == 0) { -lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; uint8_t x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; -x_102 = lean_ctor_get(x_26, 1); -lean_inc(x_102); +lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; uint8_t x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_100 = lean_ctor_get(x_26, 1); +lean_inc(x_100); lean_dec(x_26); -x_103 = lean_ctor_get(x_24, 0); -lean_inc(x_103); +x_101 = lean_ctor_get(x_24, 0); +lean_inc(x_101); lean_dec(x_24); -x_104 = l_Lean_Server_Snapshots_Snapshot_endPos(x_103); -x_105 = l_Lean_FileMap_toPosition(x_21, x_104); +x_102 = l_Lean_Server_Snapshots_Snapshot_endPos(x_101); +x_103 = l_Lean_FileMap_toPosition(x_21, x_102); lean_dec(x_21); -x_106 = lean_box(0); -x_107 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4; -x_108 = 0; -x_109 = l_Lean_instInhabitedParserDescr___closed__1; -x_110 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3; -x_111 = lean_alloc_ctor(0, 5, 1); -lean_ctor_set(x_111, 0, x_107); -lean_ctor_set(x_111, 1, x_105); -lean_ctor_set(x_111, 2, x_106); -lean_ctor_set(x_111, 3, x_109); -lean_ctor_set(x_111, 4, x_110); -lean_ctor_set_uint8(x_111, sizeof(void*)*5, x_108); -x_112 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_103); -x_113 = l_Std_PersistentArray_push___rarg(x_112, x_111); -x_114 = l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__2(x_1, x_113, x_102); -if (lean_obj_tag(x_114) == 0) +x_104 = lean_box(0); +x_105 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4; +x_106 = 0; +x_107 = l_Lean_instInhabitedParserDescr___closed__1; +x_108 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3; +x_109 = lean_alloc_ctor(0, 5, 1); +lean_ctor_set(x_109, 0, x_105); +lean_ctor_set(x_109, 1, x_103); +lean_ctor_set(x_109, 2, x_104); +lean_ctor_set(x_109, 3, x_107); +lean_ctor_set(x_109, 4, x_108); +lean_ctor_set_uint8(x_109, sizeof(void*)*5, x_106); +x_110 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_101); +x_111 = l_Std_PersistentArray_push___rarg(x_110, x_109); +x_112 = l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__2(x_1, x_111, x_100); +if (lean_obj_tag(x_112) == 0) { -lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; -x_115 = lean_ctor_get(x_114, 0); -lean_inc(x_115); -x_116 = lean_ctor_get(x_114, 1); -lean_inc(x_116); -lean_dec(x_114); -x_117 = lean_ctor_get(x_4, 1); -lean_inc(x_117); -lean_dec(x_4); -x_118 = lean_nat_to_int(x_20); -x_119 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_119, 0, x_118); -x_120 = l_Std_PersistentArray_toArray___rarg(x_115); -lean_dec(x_115); -x_121 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_121, 0, x_19); -lean_ctor_set(x_121, 1, x_119); -lean_ctor_set(x_121, 2, x_120); -x_122 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; -x_123 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_123, 0, x_122); -lean_ctor_set(x_123, 1, x_121); -x_124 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_117, x_123, x_116); -if (lean_obj_tag(x_124) == 0) +lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_113 = lean_ctor_get(x_112, 0); +lean_inc(x_113); +x_114 = lean_ctor_get(x_112, 1); +lean_inc(x_114); +lean_dec(x_112); +x_115 = lean_nat_to_int(x_20); +x_116 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_116, 0, x_115); +x_117 = l_Std_PersistentArray_toArray___rarg(x_113); +lean_dec(x_113); +x_118 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_118, 0, x_19); +lean_ctor_set(x_118, 1, x_116); +lean_ctor_set(x_118, 2, x_117); +x_119 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; +x_120 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_120, 0, x_119); +lean_ctor_set(x_120, 1, x_118); +x_121 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_4, x_120, x_114); +if (lean_obj_tag(x_121) == 0) { -lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; -x_125 = lean_ctor_get(x_124, 1); -lean_inc(x_125); -if (lean_is_exclusive(x_124)) { - lean_ctor_release(x_124, 0); - lean_ctor_release(x_124, 1); - x_126 = x_124; +lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; +x_122 = lean_ctor_get(x_121, 1); +lean_inc(x_122); +if (lean_is_exclusive(x_121)) { + lean_ctor_release(x_121, 0); + lean_ctor_release(x_121, 1); + x_123 = x_121; } else { - lean_dec_ref(x_124); - x_126 = lean_box(0); + lean_dec_ref(x_121); + x_123 = lean_box(0); } -x_127 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_127, 0, x_103); -if (lean_is_scalar(x_126)) { - x_128 = lean_alloc_ctor(0, 2, 0); +x_124 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_124, 0, x_101); +if (lean_is_scalar(x_123)) { + x_125 = lean_alloc_ctor(0, 2, 0); } else { - x_128 = x_126; + x_125 = x_123; } -lean_ctor_set(x_128, 0, x_127); -lean_ctor_set(x_128, 1, x_125); -return x_128; +lean_ctor_set(x_125, 0, x_124); +lean_ctor_set(x_125, 1, x_122); +return x_125; } else { -lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; -lean_dec(x_103); -x_129 = lean_ctor_get(x_124, 0); -lean_inc(x_129); -x_130 = lean_ctor_get(x_124, 1); -lean_inc(x_130); -if (lean_is_exclusive(x_124)) { - lean_ctor_release(x_124, 0); - lean_ctor_release(x_124, 1); - x_131 = x_124; +lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; +lean_dec(x_101); +x_126 = lean_ctor_get(x_121, 0); +lean_inc(x_126); +x_127 = lean_ctor_get(x_121, 1); +lean_inc(x_127); +if (lean_is_exclusive(x_121)) { + lean_ctor_release(x_121, 0); + lean_ctor_release(x_121, 1); + x_128 = x_121; } else { - lean_dec_ref(x_124); - x_131 = lean_box(0); + lean_dec_ref(x_121); + x_128 = lean_box(0); } -if (lean_is_scalar(x_131)) { - x_132 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_128)) { + x_129 = lean_alloc_ctor(1, 2, 0); } else { - x_132 = x_131; + x_129 = x_128; } -lean_ctor_set(x_132, 0, x_129); -lean_ctor_set(x_132, 1, x_130); -return x_132; +lean_ctor_set(x_129, 0, x_126); +lean_ctor_set(x_129, 1, x_127); +return x_129; } } else { -lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; -lean_dec(x_103); +lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; +lean_dec(x_101); lean_dec(x_20); lean_dec(x_19); lean_dec(x_4); -x_133 = lean_ctor_get(x_114, 0); -lean_inc(x_133); -x_134 = lean_ctor_get(x_114, 1); -lean_inc(x_134); -if (lean_is_exclusive(x_114)) { - lean_ctor_release(x_114, 0); - lean_ctor_release(x_114, 1); - x_135 = x_114; +x_130 = lean_ctor_get(x_112, 0); +lean_inc(x_130); +x_131 = lean_ctor_get(x_112, 1); +lean_inc(x_131); +if (lean_is_exclusive(x_112)) { + lean_ctor_release(x_112, 0); + lean_ctor_release(x_112, 1); + x_132 = x_112; } else { - lean_dec_ref(x_114); - x_135 = lean_box(0); + lean_dec_ref(x_112); + x_132 = lean_box(0); } -if (lean_is_scalar(x_135)) { - x_136 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_132)) { + x_133 = lean_alloc_ctor(1, 2, 0); } else { - x_136 = x_135; + x_133 = x_132; } -lean_ctor_set(x_136, 0, x_133); -lean_ctor_set(x_136, 1, x_134); -return x_136; +lean_ctor_set(x_133, 0, x_130); +lean_ctor_set(x_133, 1, x_131); +return x_133; } } else { -lean_object* x_137; lean_object* x_138; lean_object* x_139; +lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_dec(x_21); -x_137 = lean_ctor_get(x_26, 1); -lean_inc(x_137); +x_134 = lean_ctor_get(x_26, 1); +lean_inc(x_134); lean_dec(x_26); -x_138 = lean_ctor_get(x_24, 0); -lean_inc(x_138); +x_135 = lean_ctor_get(x_24, 0); +lean_inc(x_135); lean_dec(x_24); -x_139 = l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__9(x_1, x_138, x_137); -if (lean_obj_tag(x_139) == 0) +x_136 = l_Std_PersistentArray_mapM___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__9(x_1, x_135, x_134); +if (lean_obj_tag(x_136) == 0) { -lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; -x_140 = lean_ctor_get(x_139, 0); -lean_inc(x_140); -x_141 = lean_ctor_get(x_139, 1); -lean_inc(x_141); -lean_dec(x_139); -x_142 = lean_ctor_get(x_4, 1); -lean_inc(x_142); -lean_dec(x_4); -x_143 = lean_nat_to_int(x_20); -x_144 = lean_alloc_ctor(1, 1, 0); +lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; +x_137 = lean_ctor_get(x_136, 0); +lean_inc(x_137); +x_138 = lean_ctor_get(x_136, 1); +lean_inc(x_138); +lean_dec(x_136); +x_139 = lean_nat_to_int(x_20); +x_140 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_140, 0, x_139); +x_141 = l_Std_PersistentArray_toArray___rarg(x_137); +lean_dec(x_137); +x_142 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_142, 0, x_19); +lean_ctor_set(x_142, 1, x_140); +lean_ctor_set(x_142, 2, x_141); +x_143 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; +x_144 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_144, 0, x_143); -x_145 = l_Std_PersistentArray_toArray___rarg(x_140); -lean_dec(x_140); -x_146 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_146, 0, x_19); -lean_ctor_set(x_146, 1, x_144); -lean_ctor_set(x_146, 2, x_145); -x_147 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; -x_148 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_148, 0, x_147); -lean_ctor_set(x_148, 1, x_146); -x_149 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_142, x_148, x_141); -if (lean_obj_tag(x_149) == 0) +lean_ctor_set(x_144, 1, x_142); +x_145 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_4, x_144, x_138); +if (lean_obj_tag(x_145) == 0) +{ +lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; +x_146 = lean_ctor_get(x_145, 1); +lean_inc(x_146); +if (lean_is_exclusive(x_145)) { + lean_ctor_release(x_145, 0); + lean_ctor_release(x_145, 1); + x_147 = x_145; +} else { + lean_dec_ref(x_145); + x_147 = lean_box(0); +} +x_148 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; +if (lean_is_scalar(x_147)) { + x_149 = lean_alloc_ctor(0, 2, 0); +} else { + x_149 = x_147; +} +lean_ctor_set(x_149, 0, x_148); +lean_ctor_set(x_149, 1, x_146); +return x_149; +} +else { lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; -x_150 = lean_ctor_get(x_149, 1); +x_150 = lean_ctor_get(x_145, 0); lean_inc(x_150); -if (lean_is_exclusive(x_149)) { - lean_ctor_release(x_149, 0); - lean_ctor_release(x_149, 1); - x_151 = x_149; +x_151 = lean_ctor_get(x_145, 1); +lean_inc(x_151); +if (lean_is_exclusive(x_145)) { + lean_ctor_release(x_145, 0); + lean_ctor_release(x_145, 1); + x_152 = x_145; } else { - lean_dec_ref(x_149); - x_151 = lean_box(0); + lean_dec_ref(x_145); + x_152 = lean_box(0); } -x_152 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; -if (lean_is_scalar(x_151)) { - x_153 = lean_alloc_ctor(0, 2, 0); +if (lean_is_scalar(x_152)) { + x_153 = lean_alloc_ctor(1, 2, 0); } else { - x_153 = x_151; + x_153 = x_152; } -lean_ctor_set(x_153, 0, x_152); -lean_ctor_set(x_153, 1, x_150); +lean_ctor_set(x_153, 0, x_150); +lean_ctor_set(x_153, 1, x_151); return x_153; } +} else { lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; -x_154 = lean_ctor_get(x_149, 0); +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_4); +x_154 = lean_ctor_get(x_136, 0); lean_inc(x_154); -x_155 = lean_ctor_get(x_149, 1); +x_155 = lean_ctor_get(x_136, 1); lean_inc(x_155); -if (lean_is_exclusive(x_149)) { - lean_ctor_release(x_149, 0); - lean_ctor_release(x_149, 1); - x_156 = x_149; +if (lean_is_exclusive(x_136)) { + lean_ctor_release(x_136, 0); + lean_ctor_release(x_136, 1); + x_156 = x_136; } else { - lean_dec_ref(x_149); + lean_dec_ref(x_136); x_156 = lean_box(0); } if (lean_is_scalar(x_156)) { @@ -3328,47 +3329,18 @@ lean_ctor_set(x_157, 1, x_155); return x_157; } } -else -{ -lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; -lean_dec(x_20); -lean_dec(x_19); -lean_dec(x_4); -x_158 = lean_ctor_get(x_139, 0); -lean_inc(x_158); -x_159 = lean_ctor_get(x_139, 1); -lean_inc(x_159); -if (lean_is_exclusive(x_139)) { - lean_ctor_release(x_139, 0); - lean_ctor_release(x_139, 1); - x_160 = x_139; -} else { - lean_dec_ref(x_139); - x_160 = lean_box(0); -} -if (lean_is_scalar(x_160)) { - x_161 = lean_alloc_ctor(1, 2, 0); -} else { - x_161 = x_160; -} -lean_ctor_set(x_161, 0, x_158); -lean_ctor_set(x_161, 1, x_159); -return x_161; } } } } } -} -} -lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_4; -x_4 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(x_1, x_2, x_3); -lean_dec(x_2); +lean_object* x_3; +x_3 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(x_1, x_2); lean_dec(x_1); -return x_4; +return x_3; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { @@ -3987,7 +3959,7 @@ lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr(lean_ _start: { lean_object* x_8; lean_object* x_9; -x_8 = lean_ctor_get(x_4, 2); +x_8 = lean_ctor_get(x_5, 2); x_9 = lean_io_prim_handle_get_line(x_8, x_7); if (lean_obj_tag(x_9) == 0) { @@ -4033,8 +4005,8 @@ x_26 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_25); -lean_inc(x_5); -x_28 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_5, x_27, x_12); +lean_inc(x_4); +x_28 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_4, x_27, x_12); if (lean_obj_tag(x_28) == 0) { lean_object* x_29; lean_object* x_30; @@ -4052,7 +4024,7 @@ else uint8_t x_32; lean_dec(x_11); lean_dec(x_6); -lean_dec(x_5); +lean_dec(x_4); lean_dec(x_2); x_32 = !lean_is_exclusive(x_28); if (x_32 == 0) @@ -4077,7 +4049,7 @@ return x_35; else { lean_dec(x_11); -lean_dec(x_5); +lean_dec(x_4); lean_dec(x_2); lean_ctor_set(x_9, 0, x_6); return x_9; @@ -4125,8 +4097,8 @@ x_51 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_52, 1, x_50); -lean_inc(x_5); -x_53 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_5, x_52, x_37); +lean_inc(x_4); +x_53 = l_IO_FS_Stream_writeLspNotification___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__7(x_4, x_52, x_37); if (lean_obj_tag(x_53) == 0) { lean_object* x_54; lean_object* x_55; @@ -4144,7 +4116,7 @@ else lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_dec(x_36); lean_dec(x_6); -lean_dec(x_5); +lean_dec(x_4); lean_dec(x_2); x_57 = lean_ctor_get(x_53, 0); lean_inc(x_57); @@ -4172,7 +4144,7 @@ else { lean_object* x_61; lean_dec(x_36); -lean_dec(x_5); +lean_dec(x_4); lean_dec(x_2); x_61 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_61, 0, x_6); @@ -4185,7 +4157,7 @@ else { uint8_t x_62; lean_dec(x_6); -lean_dec(x_5); +lean_dec(x_4); lean_dec(x_2); x_62 = !lean_is_exclusive(x_9); if (x_62 == 0) @@ -4213,7 +4185,7 @@ _start: { lean_object* x_8; x_8 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_4); +lean_dec(x_5); lean_dec(x_3); lean_dec(x_1); return x_8; @@ -4252,102 +4224,212 @@ goto _start; } } } -lean_object* l_IO_FS_Handle_getLine___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_4; -x_4 = lean_io_prim_handle_get_line(x_1, x_3); +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_box(0); +x_4 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_4, 0, x_3); +lean_ctor_set(x_4, 1, x_2); return x_4; } -} -lean_object* l_IO_FS_Handle_readToEnd_read___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: +else { -lean_object* x_5; -x_5 = lean_io_prim_handle_get_line(x_1, x_4); -if (lean_obj_tag(x_5) == 0) +uint8_t x_5; +x_5 = !lean_is_exclusive(x_1); +if (x_5 == 0) { -uint8_t x_6; -x_6 = !lean_is_exclusive(x_5); -if (x_6 == 0) +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_1, 0); +x_7 = lean_ctor_get(x_1, 1); +x_8 = l_Lean_realPathNormalized(x_6, x_2); +if (lean_obj_tag(x_8) == 0) { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; -x_7 = lean_ctor_get(x_5, 0); -x_8 = lean_ctor_get(x_5, 1); -x_9 = lean_string_length(x_7); -x_10 = lean_unsigned_to_nat(0u); -x_11 = lean_nat_dec_eq(x_9, x_10); -lean_dec(x_9); -if (x_11 == 0) +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +x_11 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_7, x_10); +if (lean_obj_tag(x_11) == 0) { -lean_object* x_12; -lean_free_object(x_5); -x_12 = lean_string_append(x_2, x_7); -lean_dec(x_7); -x_2 = x_12; -x_4 = x_8; -goto _start; +uint8_t x_12; +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; +x_13 = lean_ctor_get(x_11, 0); +lean_ctor_set(x_1, 1, x_13); +lean_ctor_set(x_1, 0, x_9); +lean_ctor_set(x_11, 0, x_1); +return x_11; } else { -lean_dec(x_7); -lean_ctor_set(x_5, 0, x_2); -return x_5; -} -} -else -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; -x_14 = lean_ctor_get(x_5, 0); -x_15 = lean_ctor_get(x_5, 1); +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_11, 0); +x_15 = lean_ctor_get(x_11, 1); lean_inc(x_15); lean_inc(x_14); -lean_dec(x_5); -x_16 = lean_string_length(x_14); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_nat_dec_eq(x_16, x_17); -lean_dec(x_16); -if (x_18 == 0) -{ -lean_object* x_19; -x_19 = lean_string_append(x_2, x_14); -lean_dec(x_14); -x_2 = x_19; -x_4 = x_15; -goto _start; +lean_dec(x_11); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_9); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_1); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} } else { -lean_object* x_21; -lean_dec(x_14); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_2); -lean_ctor_set(x_21, 1, x_15); -return x_21; +uint8_t x_17; +lean_dec(x_9); +lean_free_object(x_1); +x_17 = !lean_is_exclusive(x_11); +if (x_17 == 0) +{ +return x_11; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_11, 0); +x_19 = lean_ctor_get(x_11, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_11); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; } } } else { -uint8_t x_22; -lean_dec(x_2); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) +uint8_t x_21; +lean_free_object(x_1); +lean_dec(x_7); +x_21 = !lean_is_exclusive(x_8); +if (x_21 == 0) { -return x_5; +return x_8; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_8, 0); +x_23 = lean_ctor_get(x_8, 1); lean_inc(x_23); -lean_dec(x_5); -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; +lean_inc(x_22); +lean_dec(x_8); +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; +x_25 = lean_ctor_get(x_1, 0); +x_26 = lean_ctor_get(x_1, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_1); +x_27 = l_Lean_realPathNormalized(x_25, x_2); +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_27, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_26, x_29); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +if (lean_is_exclusive(x_30)) { + lean_ctor_release(x_30, 0); + lean_ctor_release(x_30, 1); + x_33 = x_30; +} else { + lean_dec_ref(x_30); + x_33 = lean_box(0); +} +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_28); +lean_ctor_set(x_34, 1, x_31); +if (lean_is_scalar(x_33)) { + x_35 = lean_alloc_ctor(0, 2, 0); +} else { + x_35 = x_33; +} +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_32); +return x_35; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +lean_dec(x_28); +x_36 = lean_ctor_get(x_30, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_30, 1); +lean_inc(x_37); +if (lean_is_exclusive(x_30)) { + lean_ctor_release(x_30, 0); + lean_ctor_release(x_30, 1); + x_38 = x_30; +} else { + lean_dec_ref(x_30); + x_38 = lean_box(0); +} +if (lean_is_scalar(x_38)) { + x_39 = lean_alloc_ctor(1, 2, 0); +} else { + x_39 = x_38; +} +lean_ctor_set(x_39, 0, x_36); +lean_ctor_set(x_39, 1, x_37); +return x_39; +} +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_26); +x_40 = lean_ctor_get(x_27, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_27, 1); +lean_inc(x_41); +if (lean_is_exclusive(x_27)) { + lean_ctor_release(x_27, 0); + lean_ctor_release(x_27, 1); + x_42 = x_27; +} else { + lean_dec_ref(x_27); + x_42 = lean_box(0); +} +if (lean_is_scalar(x_42)) { + x_43 = lean_alloc_ctor(1, 2, 0); +} else { + x_43 = x_42; +} +lean_ctor_set(x_43, 0, x_40); +lean_ctor_set(x_43, 1, x_41); +return x_43; +} } } } @@ -4387,7 +4469,7 @@ static lean_object* _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___clos _start: { lean_object* x_1; -x_1 = lean_mk_string("unexpected output from `leanpkg src-paths`:\n"); +x_1 = lean_mk_string("`leanpkg print-paths` failed:\n"); return x_1; } } @@ -4395,57 +4477,64 @@ static lean_object* _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___clos _start: { lean_object* x_1; -x_1 = lean_mk_string("\nstderr:"); +x_1 = lean_mk_string("\nstderr:\n"); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unexpected output from `leanpkg print-paths`:\n"); return x_1; } } lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath(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; size_t x_7; size_t 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; -x_6 = lean_array_get_size(x_3); -x_7 = lean_usize_of_nat(x_6); -lean_dec(x_6); -x_8 = 0; +lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_6 = lean_box(0); +x_7 = lean_array_get_size(x_3); +x_8 = lean_usize_of_nat(x_7); +lean_dec(x_7); +x_9 = 0; lean_inc(x_3); -x_9 = x_3; -x_10 = l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__1(x_7, x_8, x_9); -x_11 = x_10; -x_12 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__3; -x_13 = l_Array_append___rarg(x_12, x_11); -lean_dec(x_11); -x_14 = lean_box(0); -x_15 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__1; -x_16 = l_Array_empty___closed__1; +x_10 = x_3; +x_11 = l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__1(x_8, x_9, x_10); +x_12 = x_11; +x_13 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__3; +x_14 = l_Array_append___rarg(x_13, x_12); +lean_dec(x_12); +x_15 = lean_box(0); +x_16 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__1; +x_17 = l_Array_empty___closed__1; lean_inc(x_1); -x_17 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_1); -lean_ctor_set(x_17, 2, x_13); -lean_ctor_set(x_17, 3, x_14); -lean_ctor_set(x_17, 4, x_16); -x_18 = lean_io_process_spawn(x_17, x_5); -if (lean_obj_tag(x_18) == 0) +x_18 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_1); +lean_ctor_set(x_18, 2, x_14); +lean_ctor_set(x_18, 3, x_15); +lean_ctor_set(x_18, 4, x_17); +x_19 = lean_io_process_spawn(x_18, x_5); +if (lean_obj_tag(x_19) == 0) { -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_19 = lean_ctor_get(x_18, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_18, 1); +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_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); -lean_dec(x_18); -x_21 = lean_ctor_get(x_4, 1); +x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); +lean_dec(x_19); x_22 = l_Lean_instInhabitedParserDescr___closed__1; -lean_inc(x_19); +lean_inc(x_20); x_23 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr___boxed), 7, 6); lean_closure_set(x_23, 0, x_1); lean_closure_set(x_23, 1, x_2); lean_closure_set(x_23, 2, x_3); -lean_closure_set(x_23, 3, x_19); -lean_closure_set(x_23, 4, x_21); +lean_closure_set(x_23, 3, x_4); +lean_closure_set(x_23, 4, x_20); lean_closure_set(x_23, 5, x_22); x_24 = l_Task_Priority_dedicated; -x_25 = lean_io_as_task(x_23, x_24, x_20); +x_25 = lean_io_as_task(x_23, x_24, x_21); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; @@ -4454,10 +4543,9 @@ lean_inc(x_26); x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); lean_dec(x_25); -x_28 = lean_ctor_get(x_19, 1); +x_28 = lean_ctor_get(x_20, 1); lean_inc(x_28); -x_29 = l_IO_FS_Handle_readToEnd_read___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_28, x_22, x_4, x_27); -lean_dec(x_4); +x_29 = l_IO_FS_Handle_readToEnd_read___at_IO_Process_output___spec__3(x_28, x_22, x_27); lean_dec(x_28); if (lean_obj_tag(x_29) == 0) { @@ -4479,8 +4567,8 @@ lean_inc(x_35); x_36 = lean_ctor_get(x_34, 1); lean_inc(x_36); lean_dec(x_34); -x_37 = lean_io_process_child_wait(x_15, x_19, x_36); -lean_dec(x_19); +x_37 = lean_io_process_child_wait(x_16, x_20, x_36); +lean_dec(x_20); if (lean_obj_tag(x_37) == 0) { uint8_t x_38; @@ -4496,295 +4584,294 @@ lean_dec(x_39); x_43 = x_42 == x_41; if (x_43 == 0) { -lean_object* x_44; +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_44 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; +x_45 = lean_string_append(x_44, x_32); lean_dec(x_32); -x_44 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_44, 0, x_35); -lean_ctor_set_tag(x_37, 1); -lean_ctor_set(x_37, 0, x_44); -return x_37; -} -else -{ -lean_object* x_45; -x_45 = l_String_split___at_Lean_stringToMessageData___spec__1(x_32); -if (lean_obj_tag(x_45) == 0) -{ -lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_46 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; -x_47 = lean_string_append(x_46, x_32); -lean_dec(x_32); -x_48 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; -x_49 = lean_string_append(x_47, x_48); -x_50 = lean_string_append(x_49, x_35); +x_46 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; +x_47 = lean_string_append(x_45, x_46); +x_48 = lean_string_append(x_47, x_35); lean_dec(x_35); -x_51 = lean_string_append(x_50, x_22); -x_52 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_52, 0, x_51); +x_49 = lean_string_append(x_48, x_22); +x_50 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_50, 0, x_49); lean_ctor_set_tag(x_37, 1); -lean_ctor_set(x_37, 0, x_52); +lean_ctor_set(x_37, 0, x_50); return x_37; } else { -lean_object* x_53; lean_object* x_54; uint8_t x_55; -x_53 = lean_ctor_get(x_45, 0); -lean_inc(x_53); -x_54 = lean_ctor_get(x_45, 1); -lean_inc(x_54); -lean_dec(x_45); -x_55 = lean_string_dec_eq(x_53, x_22); -if (x_55 == 0) +lean_object* x_51; +x_51 = l_String_split___at_Lean_stringToMessageData___spec__1(x_32); +if (lean_obj_tag(x_51) == 0) { -if (lean_obj_tag(x_54) == 0) -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; -lean_dec(x_53); -x_56 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; -x_57 = lean_string_append(x_56, x_32); +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_52 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; +x_53 = lean_string_append(x_52, x_32); lean_dec(x_32); -x_58 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; -x_59 = lean_string_append(x_57, x_58); -x_60 = lean_string_append(x_59, x_35); +x_54 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; +x_55 = lean_string_append(x_53, x_54); +x_56 = lean_string_append(x_55, x_35); lean_dec(x_35); -x_61 = lean_string_append(x_60, x_22); -x_62 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_62, 0, x_61); +x_57 = lean_string_append(x_56, x_22); +x_58 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_58, 0, x_57); lean_ctor_set_tag(x_37, 1); -lean_ctor_set(x_37, 0, x_62); +lean_ctor_set(x_37, 0, x_58); return x_37; } else { -lean_object* x_63; -x_63 = lean_ctor_get(x_54, 1); -lean_inc(x_63); -lean_dec(x_54); -if (lean_obj_tag(x_63) == 0) +lean_object* x_59; lean_object* x_60; uint8_t x_61; +x_59 = lean_ctor_get(x_51, 0); +lean_inc(x_59); +x_60 = lean_ctor_get(x_51, 1); +lean_inc(x_60); +lean_dec(x_51); +x_61 = lean_string_dec_eq(x_59, x_22); +if (x_61 == 0) { -lean_object* x_64; +if (lean_obj_tag(x_60) == 0) +{ +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_59); +x_62 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; +x_63 = lean_string_append(x_62, x_32); +lean_dec(x_32); +x_64 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; +x_65 = lean_string_append(x_63, x_64); +x_66 = lean_string_append(x_65, x_35); +lean_dec(x_35); +x_67 = lean_string_append(x_66, x_22); +x_68 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set_tag(x_37, 1); +lean_ctor_set(x_37, 0, x_68); +return x_37; +} +else +{ +lean_object* x_69; +x_69 = lean_ctor_get(x_60, 1); +lean_inc(x_69); +if (lean_obj_tag(x_69) == 0) +{ +lean_object* x_70; lean_object* x_71; lean_free_object(x_37); lean_dec(x_35); lean_dec(x_32); -x_64 = l_Lean_getBuiltinSearchPath(x_40); -if (lean_obj_tag(x_64) == 0) +x_70 = lean_ctor_get(x_60, 0); +lean_inc(x_70); +lean_dec(x_60); +x_71 = l_Lean_getBuiltinSearchPath(x_40); +if (lean_obj_tag(x_71) == 0) { -lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; uint8_t x_72; -x_65 = lean_ctor_get(x_64, 0); -lean_inc(x_65); -x_66 = lean_ctor_get(x_64, 1); -lean_inc(x_66); -lean_dec(x_64); -x_67 = l_Lean_parseSearchPath(x_53, x_65, x_66); -lean_dec(x_53); -x_68 = lean_ctor_get(x_67, 0); -lean_inc(x_68); -x_69 = lean_ctor_get(x_67, 1); -lean_inc(x_69); -lean_dec(x_67); -x_70 = l_Lean_searchPathRef; -x_71 = lean_st_ref_set(x_70, x_68, x_69); -x_72 = !lean_is_exclusive(x_71); -if (x_72 == 0) +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_71, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_71, 1); +lean_inc(x_73); +lean_dec(x_71); +x_74 = l_Lean_addSearchPathFromEnv(x_72, x_73); +if (lean_obj_tag(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; +x_75 = lean_ctor_get(x_74, 0); +lean_inc(x_75); +x_76 = lean_ctor_get(x_74, 1); +lean_inc(x_76); +lean_dec(x_74); +x_77 = l_Lean_parseSearchPath(x_59, x_75); +lean_dec(x_59); +x_78 = l_Lean_searchPathRef; +x_79 = lean_st_ref_set(x_78, x_77, x_76); +x_80 = lean_ctor_get(x_79, 1); +lean_inc(x_80); +lean_dec(x_79); +x_81 = l_Lean_parseSearchPath(x_70, x_6); +lean_dec(x_70); +x_82 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_81, x_80); +return x_82; +} +else +{ +uint8_t x_83; +lean_dec(x_70); +lean_dec(x_59); +x_83 = !lean_is_exclusive(x_74); +if (x_83 == 0) +{ +return x_74; +} +else +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; +x_84 = lean_ctor_get(x_74, 0); +x_85 = lean_ctor_get(x_74, 1); +lean_inc(x_85); +lean_inc(x_84); +lean_dec(x_74); +x_86 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_86, 0, x_84); +lean_ctor_set(x_86, 1, x_85); +return x_86; +} +} +} +else +{ +uint8_t x_87; +lean_dec(x_70); +lean_dec(x_59); +x_87 = !lean_is_exclusive(x_71); +if (x_87 == 0) { return x_71; } else { -lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_73 = lean_ctor_get(x_71, 0); -x_74 = lean_ctor_get(x_71, 1); -lean_inc(x_74); -lean_inc(x_73); -lean_dec(x_71); -x_75 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_75, 0, x_73); -lean_ctor_set(x_75, 1, x_74); -return x_75; -} -} -else -{ -uint8_t x_76; -lean_dec(x_53); -x_76 = !lean_is_exclusive(x_64); -if (x_76 == 0) -{ -return x_64; -} -else -{ -lean_object* x_77; lean_object* x_78; lean_object* x_79; -x_77 = lean_ctor_get(x_64, 0); -x_78 = lean_ctor_get(x_64, 1); -lean_inc(x_78); -lean_inc(x_77); -lean_dec(x_64); -x_79 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_79, 0, x_77); -lean_ctor_set(x_79, 1, x_78); -return x_79; -} -} -} -else -{ -lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; -lean_dec(x_63); -lean_dec(x_53); -x_80 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; -x_81 = lean_string_append(x_80, x_32); -lean_dec(x_32); -x_82 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; -x_83 = lean_string_append(x_81, x_82); -x_84 = lean_string_append(x_83, x_35); -lean_dec(x_35); -x_85 = lean_string_append(x_84, x_22); -x_86 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_86, 0, x_85); -lean_ctor_set_tag(x_37, 1); -lean_ctor_set(x_37, 0, x_86); -return x_37; -} -} -} -else -{ -lean_dec(x_53); -if (lean_obj_tag(x_54) == 0) -{ -lean_object* x_87; -lean_dec(x_35); -lean_dec(x_32); -x_87 = lean_box(0); -lean_ctor_set(x_37, 0, x_87); -return x_37; -} -else -{ -lean_object* x_88; -x_88 = lean_ctor_get(x_54, 1); +lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_88 = lean_ctor_get(x_71, 0); +x_89 = lean_ctor_get(x_71, 1); +lean_inc(x_89); lean_inc(x_88); -lean_dec(x_54); -if (lean_obj_tag(x_88) == 0) +lean_dec(x_71); +x_90 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_90, 0, x_88); +lean_ctor_set(x_90, 1, x_89); +return x_90; +} +} +} +else { -lean_object* x_89; +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; +lean_dec(x_69); +lean_dec(x_60); +lean_dec(x_59); +x_91 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; +x_92 = lean_string_append(x_91, x_32); +lean_dec(x_32); +x_93 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; +x_94 = lean_string_append(x_92, x_93); +x_95 = lean_string_append(x_94, x_35); +lean_dec(x_35); +x_96 = lean_string_append(x_95, x_22); +x_97 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_97, 0, x_96); +lean_ctor_set_tag(x_37, 1); +lean_ctor_set(x_37, 0, x_97); +return x_37; +} +} +} +else +{ +lean_dec(x_59); +if (lean_obj_tag(x_60) == 0) +{ +lean_dec(x_35); +lean_dec(x_32); +lean_ctor_set(x_37, 0, x_6); +return x_37; +} +else +{ +lean_object* x_98; +x_98 = lean_ctor_get(x_60, 1); +lean_inc(x_98); +if (lean_obj_tag(x_98) == 0) +{ +lean_object* x_99; lean_object* x_100; lean_free_object(x_37); lean_dec(x_35); lean_dec(x_32); -x_89 = l_Lean_getBuiltinSearchPath(x_40); -if (lean_obj_tag(x_89) == 0) -{ -lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; uint8_t x_97; -x_90 = lean_ctor_get(x_89, 0); -lean_inc(x_90); -x_91 = lean_ctor_get(x_89, 1); -lean_inc(x_91); -lean_dec(x_89); -x_92 = l_Lean_parseSearchPath(x_22, x_90, x_91); -x_93 = lean_ctor_get(x_92, 0); -lean_inc(x_93); -x_94 = lean_ctor_get(x_92, 1); -lean_inc(x_94); -lean_dec(x_92); -x_95 = l_Lean_searchPathRef; -x_96 = lean_st_ref_set(x_95, x_93, x_94); -x_97 = !lean_is_exclusive(x_96); -if (x_97 == 0) -{ -return x_96; -} -else -{ -lean_object* x_98; lean_object* x_99; lean_object* x_100; -x_98 = lean_ctor_get(x_96, 0); -x_99 = lean_ctor_get(x_96, 1); +x_99 = lean_ctor_get(x_60, 0); lean_inc(x_99); -lean_inc(x_98); -lean_dec(x_96); -x_100 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_100, 0, x_98); -lean_ctor_set(x_100, 1, x_99); -return x_100; -} -} -else +lean_dec(x_60); +x_100 = l_Lean_getBuiltinSearchPath(x_40); +if (lean_obj_tag(x_100) == 0) { -uint8_t x_101; -x_101 = !lean_is_exclusive(x_89); -if (x_101 == 0) -{ -return x_89; -} -else -{ -lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_102 = lean_ctor_get(x_89, 0); -x_103 = lean_ctor_get(x_89, 1); -lean_inc(x_103); +lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_101 = lean_ctor_get(x_100, 0); +lean_inc(x_101); +x_102 = lean_ctor_get(x_100, 1); lean_inc(x_102); -lean_dec(x_89); -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; -} -} +lean_dec(x_100); +x_103 = l_Lean_addSearchPathFromEnv(x_101, x_102); +if (lean_obj_tag(x_103) == 0) +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_104 = lean_ctor_get(x_103, 0); +lean_inc(x_104); +x_105 = lean_ctor_get(x_103, 1); +lean_inc(x_105); +lean_dec(x_103); +x_106 = l_Lean_parseSearchPath(x_22, x_104); +x_107 = l_Lean_searchPathRef; +x_108 = lean_st_ref_set(x_107, x_106, x_105); +x_109 = lean_ctor_get(x_108, 1); +lean_inc(x_109); +lean_dec(x_108); +x_110 = l_Lean_parseSearchPath(x_99, x_6); +lean_dec(x_99); +x_111 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_110, x_109); +return x_111; } else { -lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; -lean_dec(x_88); -x_105 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; -x_106 = lean_string_append(x_105, x_32); -lean_dec(x_32); -x_107 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; -x_108 = lean_string_append(x_106, x_107); -x_109 = lean_string_append(x_108, x_35); -lean_dec(x_35); -x_110 = lean_string_append(x_109, x_22); -x_111 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_111, 0, x_110); -lean_ctor_set_tag(x_37, 1); -lean_ctor_set(x_37, 0, x_111); -return x_37; -} -} -} -} -} +uint8_t x_112; +lean_dec(x_99); +x_112 = !lean_is_exclusive(x_103); +if (x_112 == 0) +{ +return x_103; } else { -lean_object* x_112; lean_object* x_113; uint32_t x_114; uint32_t x_115; uint8_t x_116; -x_112 = lean_ctor_get(x_37, 0); -x_113 = lean_ctor_get(x_37, 1); +lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_113 = lean_ctor_get(x_103, 0); +x_114 = lean_ctor_get(x_103, 1); +lean_inc(x_114); lean_inc(x_113); -lean_inc(x_112); -lean_dec(x_37); -x_114 = 0; -x_115 = lean_unbox_uint32(x_112); -lean_dec(x_112); -x_116 = x_115 == x_114; +lean_dec(x_103); +x_115 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_115, 0, x_113); +lean_ctor_set(x_115, 1, x_114); +return x_115; +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_99); +x_116 = !lean_is_exclusive(x_100); if (x_116 == 0) { -lean_object* x_117; lean_object* x_118; -lean_dec(x_32); -x_117 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_117, 0, x_35); -x_118 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_118, 0, x_117); -lean_ctor_set(x_118, 1, x_113); -return x_118; +return x_100; } else { -lean_object* x_119; -x_119 = l_String_split___at_Lean_stringToMessageData___spec__1(x_32); -if (lean_obj_tag(x_119) == 0) +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_100, 0); +x_118 = lean_ctor_get(x_100, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_100); +x_119 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_119, 0, x_117); +lean_ctor_set(x_119, 1, x_118); +return x_119; +} +} +} +else { -lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; -x_120 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; +lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; +lean_dec(x_98); +lean_dec(x_60); +x_120 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; x_121 = lean_string_append(x_120, x_32); lean_dec(x_32); x_122 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; @@ -4794,246 +4881,344 @@ lean_dec(x_35); x_125 = lean_string_append(x_124, x_22); x_126 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_126, 0, x_125); -x_127 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_127, 0, x_126); -lean_ctor_set(x_127, 1, x_113); -return x_127; +lean_ctor_set_tag(x_37, 1); +lean_ctor_set(x_37, 0, x_126); +return x_37; +} +} +} +} +} } else { -lean_object* x_128; lean_object* x_129; uint8_t x_130; -x_128 = lean_ctor_get(x_119, 0); +lean_object* x_127; lean_object* x_128; uint32_t x_129; uint32_t x_130; uint8_t x_131; +x_127 = lean_ctor_get(x_37, 0); +x_128 = lean_ctor_get(x_37, 1); lean_inc(x_128); -x_129 = lean_ctor_get(x_119, 1); -lean_inc(x_129); -lean_dec(x_119); -x_130 = lean_string_dec_eq(x_128, x_22); -if (x_130 == 0) +lean_inc(x_127); +lean_dec(x_37); +x_129 = 0; +x_130 = lean_unbox_uint32(x_127); +lean_dec(x_127); +x_131 = x_130 == x_129; +if (x_131 == 0) { -if (lean_obj_tag(x_129) == 0) -{ -lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; -lean_dec(x_128); -x_131 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; -x_132 = lean_string_append(x_131, x_32); +lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; +x_132 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; +x_133 = lean_string_append(x_132, x_32); lean_dec(x_32); -x_133 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; -x_134 = lean_string_append(x_132, x_133); -x_135 = lean_string_append(x_134, x_35); +x_134 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; +x_135 = lean_string_append(x_133, x_134); +x_136 = lean_string_append(x_135, x_35); lean_dec(x_35); -x_136 = lean_string_append(x_135, x_22); -x_137 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_137, 0, x_136); -x_138 = lean_alloc_ctor(1, 2, 0); +x_137 = lean_string_append(x_136, x_22); +x_138 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_138, 0, x_137); -lean_ctor_set(x_138, 1, x_113); -return x_138; +x_139 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_139, 0, x_138); +lean_ctor_set(x_139, 1, x_128); +return x_139; } else { -lean_object* x_139; -x_139 = lean_ctor_get(x_129, 1); -lean_inc(x_139); -lean_dec(x_129); -if (lean_obj_tag(x_139) == 0) -{ lean_object* x_140; -lean_dec(x_35); -lean_dec(x_32); -x_140 = l_Lean_getBuiltinSearchPath(x_113); +x_140 = l_String_split___at_Lean_stringToMessageData___spec__1(x_32); if (lean_obj_tag(x_140) == 0) { -lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; -x_141 = lean_ctor_get(x_140, 0); -lean_inc(x_141); -x_142 = lean_ctor_get(x_140, 1); -lean_inc(x_142); -lean_dec(x_140); -x_143 = l_Lean_parseSearchPath(x_128, x_141, x_142); -lean_dec(x_128); -x_144 = lean_ctor_get(x_143, 0); -lean_inc(x_144); -x_145 = lean_ctor_get(x_143, 1); -lean_inc(x_145); -lean_dec(x_143); -x_146 = l_Lean_searchPathRef; -x_147 = lean_st_ref_set(x_146, x_144, x_145); -x_148 = lean_ctor_get(x_147, 0); -lean_inc(x_148); -x_149 = lean_ctor_get(x_147, 1); +lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; +x_141 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; +x_142 = lean_string_append(x_141, x_32); +lean_dec(x_32); +x_143 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; +x_144 = lean_string_append(x_142, x_143); +x_145 = lean_string_append(x_144, x_35); +lean_dec(x_35); +x_146 = lean_string_append(x_145, x_22); +x_147 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_147, 0, x_146); +x_148 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_148, 0, x_147); +lean_ctor_set(x_148, 1, x_128); +return x_148; +} +else +{ +lean_object* x_149; lean_object* x_150; uint8_t x_151; +x_149 = lean_ctor_get(x_140, 0); lean_inc(x_149); -if (lean_is_exclusive(x_147)) { - lean_ctor_release(x_147, 0); - lean_ctor_release(x_147, 1); - x_150 = x_147; -} else { - lean_dec_ref(x_147); - x_150 = lean_box(0); -} -if (lean_is_scalar(x_150)) { - x_151 = lean_alloc_ctor(0, 2, 0); -} else { - x_151 = x_150; -} -lean_ctor_set(x_151, 0, x_148); -lean_ctor_set(x_151, 1, x_149); -return x_151; -} -else +x_150 = lean_ctor_get(x_140, 1); +lean_inc(x_150); +lean_dec(x_140); +x_151 = lean_string_dec_eq(x_149, x_22); +if (x_151 == 0) { -lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; -lean_dec(x_128); -x_152 = lean_ctor_get(x_140, 0); -lean_inc(x_152); -x_153 = lean_ctor_get(x_140, 1); -lean_inc(x_153); -if (lean_is_exclusive(x_140)) { - lean_ctor_release(x_140, 0); - lean_ctor_release(x_140, 1); - x_154 = x_140; -} else { - lean_dec_ref(x_140); - x_154 = lean_box(0); -} -if (lean_is_scalar(x_154)) { - x_155 = lean_alloc_ctor(1, 2, 0); -} else { - x_155 = x_154; -} -lean_ctor_set(x_155, 0, x_152); -lean_ctor_set(x_155, 1, x_153); -return x_155; -} -} -else +if (lean_obj_tag(x_150) == 0) { -lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; -lean_dec(x_139); -lean_dec(x_128); -x_156 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; -x_157 = lean_string_append(x_156, x_32); +lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; +lean_dec(x_149); +x_152 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; +x_153 = lean_string_append(x_152, x_32); lean_dec(x_32); -x_158 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; -x_159 = lean_string_append(x_157, x_158); -x_160 = lean_string_append(x_159, x_35); +x_154 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; +x_155 = lean_string_append(x_153, x_154); +x_156 = lean_string_append(x_155, x_35); lean_dec(x_35); -x_161 = lean_string_append(x_160, x_22); -x_162 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_162, 0, x_161); -x_163 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_163, 0, x_162); -lean_ctor_set(x_163, 1, x_113); -return x_163; -} -} +x_157 = lean_string_append(x_156, x_22); +x_158 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_158, 0, x_157); +x_159 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_159, 0, x_158); +lean_ctor_set(x_159, 1, x_128); +return x_159; } else { -lean_dec(x_128); -if (lean_obj_tag(x_129) == 0) +lean_object* x_160; +x_160 = lean_ctor_get(x_150, 1); +lean_inc(x_160); +if (lean_obj_tag(x_160) == 0) { -lean_object* x_164; lean_object* x_165; +lean_object* x_161; lean_object* x_162; lean_dec(x_35); lean_dec(x_32); -x_164 = lean_box(0); -x_165 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_165, 0, x_164); -lean_ctor_set(x_165, 1, x_113); -return x_165; -} -else +x_161 = lean_ctor_get(x_150, 0); +lean_inc(x_161); +lean_dec(x_150); +x_162 = l_Lean_getBuiltinSearchPath(x_128); +if (lean_obj_tag(x_162) == 0) { -lean_object* x_166; -x_166 = lean_ctor_get(x_129, 1); +lean_object* x_163; lean_object* x_164; lean_object* x_165; +x_163 = lean_ctor_get(x_162, 0); +lean_inc(x_163); +x_164 = lean_ctor_get(x_162, 1); +lean_inc(x_164); +lean_dec(x_162); +x_165 = l_Lean_addSearchPathFromEnv(x_163, x_164); +if (lean_obj_tag(x_165) == 0) +{ +lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; +x_166 = lean_ctor_get(x_165, 0); lean_inc(x_166); -lean_dec(x_129); -if (lean_obj_tag(x_166) == 0) -{ -lean_object* x_167; -lean_dec(x_35); -lean_dec(x_32); -x_167 = l_Lean_getBuiltinSearchPath(x_113); -if (lean_obj_tag(x_167) == 0) -{ -lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; -x_168 = lean_ctor_get(x_167, 0); -lean_inc(x_168); -x_169 = lean_ctor_get(x_167, 1); -lean_inc(x_169); -lean_dec(x_167); -x_170 = l_Lean_parseSearchPath(x_22, x_168, x_169); -x_171 = lean_ctor_get(x_170, 0); +x_167 = lean_ctor_get(x_165, 1); +lean_inc(x_167); +lean_dec(x_165); +x_168 = l_Lean_parseSearchPath(x_149, x_166); +lean_dec(x_149); +x_169 = l_Lean_searchPathRef; +x_170 = lean_st_ref_set(x_169, x_168, x_167); +x_171 = lean_ctor_get(x_170, 1); lean_inc(x_171); -x_172 = lean_ctor_get(x_170, 1); -lean_inc(x_172); lean_dec(x_170); -x_173 = l_Lean_searchPathRef; -x_174 = lean_st_ref_set(x_173, x_171, x_172); -x_175 = lean_ctor_get(x_174, 0); +x_172 = l_Lean_parseSearchPath(x_161, x_6); +lean_dec(x_161); +x_173 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_172, x_171); +return x_173; +} +else +{ +lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; +lean_dec(x_161); +lean_dec(x_149); +x_174 = lean_ctor_get(x_165, 0); +lean_inc(x_174); +x_175 = lean_ctor_get(x_165, 1); lean_inc(x_175); -x_176 = lean_ctor_get(x_174, 1); -lean_inc(x_176); -if (lean_is_exclusive(x_174)) { - lean_ctor_release(x_174, 0); - lean_ctor_release(x_174, 1); - x_177 = x_174; +if (lean_is_exclusive(x_165)) { + lean_ctor_release(x_165, 0); + lean_ctor_release(x_165, 1); + x_176 = x_165; } else { - lean_dec_ref(x_174); - x_177 = lean_box(0); + lean_dec_ref(x_165); + x_176 = lean_box(0); } -if (lean_is_scalar(x_177)) { - x_178 = lean_alloc_ctor(0, 2, 0); +if (lean_is_scalar(x_176)) { + x_177 = lean_alloc_ctor(1, 2, 0); } else { - x_178 = x_177; + x_177 = x_176; +} +lean_ctor_set(x_177, 0, x_174); +lean_ctor_set(x_177, 1, x_175); +return x_177; } -lean_ctor_set(x_178, 0, x_175); -lean_ctor_set(x_178, 1, x_176); -return x_178; } else { -lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; -x_179 = lean_ctor_get(x_167, 0); +lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; +lean_dec(x_161); +lean_dec(x_149); +x_178 = lean_ctor_get(x_162, 0); +lean_inc(x_178); +x_179 = lean_ctor_get(x_162, 1); lean_inc(x_179); -x_180 = lean_ctor_get(x_167, 1); -lean_inc(x_180); -if (lean_is_exclusive(x_167)) { - lean_ctor_release(x_167, 0); - lean_ctor_release(x_167, 1); - x_181 = x_167; +if (lean_is_exclusive(x_162)) { + lean_ctor_release(x_162, 0); + lean_ctor_release(x_162, 1); + x_180 = x_162; } else { - lean_dec_ref(x_167); - x_181 = lean_box(0); + lean_dec_ref(x_162); + x_180 = lean_box(0); } -if (lean_is_scalar(x_181)) { - x_182 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_180)) { + x_181 = lean_alloc_ctor(1, 2, 0); } else { - x_182 = x_181; + x_181 = x_180; } -lean_ctor_set(x_182, 0, x_179); -lean_ctor_set(x_182, 1, x_180); -return x_182; +lean_ctor_set(x_181, 0, x_178); +lean_ctor_set(x_181, 1, x_179); +return x_181; } } else { -lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; -lean_dec(x_166); -x_183 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; -x_184 = lean_string_append(x_183, x_32); +lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; +lean_dec(x_160); +lean_dec(x_150); +lean_dec(x_149); +x_182 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; +x_183 = lean_string_append(x_182, x_32); lean_dec(x_32); -x_185 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; -x_186 = lean_string_append(x_184, x_185); -x_187 = lean_string_append(x_186, x_35); +x_184 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; +x_185 = lean_string_append(x_183, x_184); +x_186 = lean_string_append(x_185, x_35); lean_dec(x_35); -x_188 = lean_string_append(x_187, x_22); -x_189 = lean_alloc_ctor(18, 1, 0); +x_187 = lean_string_append(x_186, x_22); +x_188 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_188, 0, x_187); +x_189 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_189, 0, x_188); -x_190 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_190, 0, x_189); -lean_ctor_set(x_190, 1, x_113); +lean_ctor_set(x_189, 1, x_128); +return x_189; +} +} +} +else +{ +lean_dec(x_149); +if (lean_obj_tag(x_150) == 0) +{ +lean_object* x_190; +lean_dec(x_35); +lean_dec(x_32); +x_190 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_190, 0, x_6); +lean_ctor_set(x_190, 1, x_128); return x_190; } +else +{ +lean_object* x_191; +x_191 = lean_ctor_get(x_150, 1); +lean_inc(x_191); +if (lean_obj_tag(x_191) == 0) +{ +lean_object* x_192; lean_object* x_193; +lean_dec(x_35); +lean_dec(x_32); +x_192 = lean_ctor_get(x_150, 0); +lean_inc(x_192); +lean_dec(x_150); +x_193 = l_Lean_getBuiltinSearchPath(x_128); +if (lean_obj_tag(x_193) == 0) +{ +lean_object* x_194; lean_object* x_195; lean_object* x_196; +x_194 = lean_ctor_get(x_193, 0); +lean_inc(x_194); +x_195 = lean_ctor_get(x_193, 1); +lean_inc(x_195); +lean_dec(x_193); +x_196 = l_Lean_addSearchPathFromEnv(x_194, x_195); +if (lean_obj_tag(x_196) == 0) +{ +lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; +x_197 = lean_ctor_get(x_196, 0); +lean_inc(x_197); +x_198 = lean_ctor_get(x_196, 1); +lean_inc(x_198); +lean_dec(x_196); +x_199 = l_Lean_parseSearchPath(x_22, x_197); +x_200 = l_Lean_searchPathRef; +x_201 = lean_st_ref_set(x_200, x_199, x_198); +x_202 = lean_ctor_get(x_201, 1); +lean_inc(x_202); +lean_dec(x_201); +x_203 = l_Lean_parseSearchPath(x_192, x_6); +lean_dec(x_192); +x_204 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_203, x_202); +return x_204; +} +else +{ +lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; +lean_dec(x_192); +x_205 = lean_ctor_get(x_196, 0); +lean_inc(x_205); +x_206 = lean_ctor_get(x_196, 1); +lean_inc(x_206); +if (lean_is_exclusive(x_196)) { + lean_ctor_release(x_196, 0); + lean_ctor_release(x_196, 1); + x_207 = x_196; +} else { + lean_dec_ref(x_196); + x_207 = lean_box(0); +} +if (lean_is_scalar(x_207)) { + x_208 = lean_alloc_ctor(1, 2, 0); +} else { + x_208 = x_207; +} +lean_ctor_set(x_208, 0, x_205); +lean_ctor_set(x_208, 1, x_206); +return x_208; +} +} +else +{ +lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; +lean_dec(x_192); +x_209 = lean_ctor_get(x_193, 0); +lean_inc(x_209); +x_210 = lean_ctor_get(x_193, 1); +lean_inc(x_210); +if (lean_is_exclusive(x_193)) { + lean_ctor_release(x_193, 0); + lean_ctor_release(x_193, 1); + x_211 = x_193; +} else { + lean_dec_ref(x_193); + x_211 = lean_box(0); +} +if (lean_is_scalar(x_211)) { + x_212 = lean_alloc_ctor(1, 2, 0); +} else { + x_212 = x_211; +} +lean_ctor_set(x_212, 0, x_209); +lean_ctor_set(x_212, 1, x_210); +return x_212; +} +} +else +{ +lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; +lean_dec(x_191); +lean_dec(x_150); +x_213 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; +x_214 = lean_string_append(x_213, x_32); +lean_dec(x_32); +x_215 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; +x_216 = lean_string_append(x_214, x_215); +x_217 = lean_string_append(x_216, x_35); +lean_dec(x_35); +x_218 = lean_string_append(x_217, x_22); +x_219 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_219, 0, x_218); +x_220 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_220, 0, x_219); +lean_ctor_set(x_220, 1, x_128); +return x_220; +} } } } @@ -5042,128 +5227,127 @@ return x_190; } else { -uint8_t x_191; +uint8_t x_221; lean_dec(x_35); lean_dec(x_32); -x_191 = !lean_is_exclusive(x_37); -if (x_191 == 0) +x_221 = !lean_is_exclusive(x_37); +if (x_221 == 0) { return x_37; } else { -lean_object* x_192; lean_object* x_193; lean_object* x_194; -x_192 = lean_ctor_get(x_37, 0); -x_193 = lean_ctor_get(x_37, 1); -lean_inc(x_193); -lean_inc(x_192); +lean_object* x_222; lean_object* x_223; lean_object* x_224; +x_222 = lean_ctor_get(x_37, 0); +x_223 = lean_ctor_get(x_37, 1); +lean_inc(x_223); +lean_inc(x_222); lean_dec(x_37); -x_194 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_194, 0, x_192); -lean_ctor_set(x_194, 1, x_193); -return x_194; +x_224 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_224, 0, x_222); +lean_ctor_set(x_224, 1, x_223); +return x_224; } } } else { -uint8_t x_195; +uint8_t x_225; lean_dec(x_32); -lean_dec(x_19); -x_195 = !lean_is_exclusive(x_34); -if (x_195 == 0) +lean_dec(x_20); +x_225 = !lean_is_exclusive(x_34); +if (x_225 == 0) { return x_34; } else { -lean_object* x_196; lean_object* x_197; lean_object* x_198; -x_196 = lean_ctor_get(x_34, 0); -x_197 = lean_ctor_get(x_34, 1); -lean_inc(x_197); -lean_inc(x_196); +lean_object* x_226; lean_object* x_227; lean_object* x_228; +x_226 = lean_ctor_get(x_34, 0); +x_227 = lean_ctor_get(x_34, 1); +lean_inc(x_227); +lean_inc(x_226); lean_dec(x_34); -x_198 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_198, 0, x_196); -lean_ctor_set(x_198, 1, x_197); -return x_198; +x_228 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_228, 0, x_226); +lean_ctor_set(x_228, 1, x_227); +return x_228; } } } else { -uint8_t x_199; +uint8_t x_229; lean_dec(x_26); -lean_dec(x_19); -x_199 = !lean_is_exclusive(x_29); -if (x_199 == 0) +lean_dec(x_20); +x_229 = !lean_is_exclusive(x_29); +if (x_229 == 0) { return x_29; } else { -lean_object* x_200; lean_object* x_201; lean_object* x_202; -x_200 = lean_ctor_get(x_29, 0); -x_201 = lean_ctor_get(x_29, 1); -lean_inc(x_201); -lean_inc(x_200); +lean_object* x_230; lean_object* x_231; lean_object* x_232; +x_230 = lean_ctor_get(x_29, 0); +x_231 = lean_ctor_get(x_29, 1); +lean_inc(x_231); +lean_inc(x_230); lean_dec(x_29); -x_202 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_202, 0, x_200); -lean_ctor_set(x_202, 1, x_201); -return x_202; +x_232 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_232, 0, x_230); +lean_ctor_set(x_232, 1, x_231); +return x_232; } } } else { -uint8_t x_203; -lean_dec(x_19); -lean_dec(x_4); -x_203 = !lean_is_exclusive(x_25); -if (x_203 == 0) +uint8_t x_233; +lean_dec(x_20); +x_233 = !lean_is_exclusive(x_25); +if (x_233 == 0) { return x_25; } else { -lean_object* x_204; lean_object* x_205; lean_object* x_206; -x_204 = lean_ctor_get(x_25, 0); -x_205 = lean_ctor_get(x_25, 1); -lean_inc(x_205); -lean_inc(x_204); +lean_object* x_234; lean_object* x_235; lean_object* x_236; +x_234 = lean_ctor_get(x_25, 0); +x_235 = lean_ctor_get(x_25, 1); +lean_inc(x_235); +lean_inc(x_234); lean_dec(x_25); -x_206 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_206, 0, x_204); -lean_ctor_set(x_206, 1, x_205); -return x_206; +x_236 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_236, 0, x_234); +lean_ctor_set(x_236, 1, x_235); +return x_236; } } } else { -uint8_t x_207; +uint8_t x_237; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_207 = !lean_is_exclusive(x_18); -if (x_207 == 0) +x_237 = !lean_is_exclusive(x_19); +if (x_237 == 0) { -return x_18; +return x_19; } else { -lean_object* x_208; lean_object* x_209; lean_object* x_210; -x_208 = lean_ctor_get(x_18, 0); -x_209 = lean_ctor_get(x_18, 1); -lean_inc(x_209); -lean_inc(x_208); -lean_dec(x_18); -x_210 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_210, 0, x_208); -lean_ctor_set(x_210, 1, x_209); -return x_210; +lean_object* x_238; lean_object* x_239; lean_object* x_240; +x_238 = lean_ctor_get(x_19, 0); +x_239 = lean_ctor_get(x_19, 1); +lean_inc(x_239); +lean_inc(x_238); +lean_dec(x_19); +x_240 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_240, 0, x_238); +lean_ctor_set(x_240, 1, x_239); +return x_240; } } } @@ -5180,27 +5364,7 @@ x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath_ return x_6; } } -lean_object* l_IO_FS_Handle_getLine___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_IO_FS_Handle_getLine___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__3(x_1, x_2, x_3); -lean_dec(x_2); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_IO_FS_Handle_readToEnd_read___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_IO_FS_Handle_readToEnd_read___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_Server_FileWorker_compileDocument_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_FileWorker_compileHeader_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 0) @@ -5222,15 +5386,46 @@ return x_6; } } } -lean_object* l_Lean_Server_FileWorker_compileDocument_match__1(lean_object* x_1) { +lean_object* l_Lean_Server_FileWorker_compileHeader_match__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileDocument_match__1___rarg), 3, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileHeader_match__1___rarg), 3, 0); return x_2; } } -lean_object* l_Lean_Server_FileWorker_compileDocument_match__2___rarg(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Server_FileWorker_compileHeader_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_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_Server_FileWorker_compileHeader_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileHeader_match__2___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_compileHeader_match__3___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; @@ -5243,15 +5438,15 @@ x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } -lean_object* l_Lean_Server_FileWorker_compileDocument_match__2(lean_object* x_1) { +lean_object* l_Lean_Server_FileWorker_compileHeader_match__3(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileDocument_match__2___rarg), 2, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileHeader_match__3___rarg), 2, 0); return x_2; } } -lean_object* l_Lean_Server_FileWorker_compileDocument_match__3___rarg(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Server_FileWorker_compileHeader_match__4___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; @@ -5269,96 +5464,15 @@ x_7 = lean_apply_3(x_2, x_4, x_5, x_6); return x_7; } } -lean_object* l_Lean_Server_FileWorker_compileDocument_match__3(lean_object* x_1) { +lean_object* l_Lean_Server_FileWorker_compileHeader_match__4(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileDocument_match__3___rarg), 2, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileHeader_match__4___rarg), 2, 0); return x_2; } } -lean_object* l_IO_getEnv___at_Lean_Server_FileWorker_compileDocument___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_io_getenv(x_1, x_3); -return x_4; -} -} -lean_object* l_IO_fileExists___at_Lean_Server_FileWorker_compileDocument___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_io_file_exists(x_1, x_3); -return x_4; -} -} -lean_object* l_IO_appPath___at_Lean_Server_FileWorker_compileDocument___spec__4___rarg(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_io_app_dir(x_1); -return x_2; -} -} -lean_object* l_IO_appPath___at_Lean_Server_FileWorker_compileDocument___spec__4(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_IO_appPath___at_Lean_Server_FileWorker_compileDocument___spec__4___rarg), 1, 0); -return x_2; -} -} -lean_object* l_IO_realPath___at_Lean_Server_FileWorker_compileDocument___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_io_realpath(x_1, x_3); -return x_4; -} -} -lean_object* l_IO_appDir___at_Lean_Server_FileWorker_compileDocument___spec__3(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_io_app_dir(x_2); -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_3, 1); -lean_inc(x_5); -lean_dec(x_3); -x_6 = l_System_FilePath_dirName(x_4); -x_7 = lean_io_realpath(x_6, x_5); -return x_7; -} -else -{ -uint8_t x_8; -x_8 = !lean_is_exclusive(x_3); -if (x_8 == 0) -{ -return x_3; -} -else -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_9 = lean_ctor_get(x_3, 0); -x_10 = lean_ctor_get(x_3, 1); -lean_inc(x_10); -lean_inc(x_9); -lean_dec(x_3); -x_11 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_11, 0, x_9); -lean_ctor_set(x_11, 1, x_10); -return x_11; -} -} -} -} -static lean_object* _init_l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__1() { +static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__1() { _start: { lean_object* x_1; @@ -5366,17 +5480,17 @@ x_1 = lean_mk_string("interpreter"); return x_1; } } -static lean_object* _init_l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__2() { +static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__1; +x_2 = l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__3() { +static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__3() { _start: { lean_object* x_1; @@ -5384,41 +5498,42 @@ x_1 = lean_mk_string("prefer_native"); return x_1; } } -static lean_object* _init_l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__4() { +static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__2; -x_2 = l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__3; +x_1 = l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__2; +x_2 = l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__3; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -uint32_t x_10; lean_object* x_11; -x_10 = 0; +uint32_t x_9; lean_object* x_10; +x_9 = 0; lean_inc(x_2); -x_11 = l_Lean_Elab_processHeader(x_1, x_2, x_3, x_4, x_10, x_9); -if (lean_obj_tag(x_11) == 0) +x_10 = l_Lean_Elab_processHeader(x_1, x_2, x_3, x_4, x_9, x_8); +if (lean_obj_tag(x_10) == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_11, 1); -lean_inc(x_13); -lean_dec(x_11); +uint8_t x_11; +x_11 = !lean_is_exclusive(x_10); +if (x_11 == 0) +{ +lean_object* x_12; uint8_t x_13; +x_12 = lean_ctor_get(x_10, 0); +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; x_14 = lean_ctor_get(x_12, 0); -lean_inc(x_14); x_15 = lean_ctor_get(x_12, 1); -lean_inc(x_15); -lean_dec(x_12); lean_inc(x_2); lean_inc(x_15); lean_inc(x_14); x_16 = l_Lean_Elab_Command_mkState(x_14, x_15, x_2); -x_17 = l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__4; +x_17 = l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__4; x_18 = 0; lean_inc(x_2); x_19 = l_Lean_KVMap_setBool(x_2, x_17, x_18); @@ -5459,7 +5574,7 @@ lean_dec(x_33); x_34 = !lean_is_exclusive(x_27); if (x_34 == 0) { -uint8_t 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; +uint8_t x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; x_35 = 1; lean_ctor_set_uint8(x_27, sizeof(void*)*2, x_35); x_36 = l_Lean_Unhygienic_run___rarg___closed__2; @@ -5478,419 +5593,558 @@ lean_ctor_set(x_40, 0, x_39); lean_ctor_set(x_40, 1, x_1); lean_ctor_set(x_40, 2, x_5); lean_ctor_set(x_40, 3, x_38); -x_41 = l_Lean_Server_FileWorker_CancelToken_new(x_13); -x_42 = lean_ctor_get(x_41, 0); +lean_ctor_set(x_12, 1, x_6); +lean_ctor_set(x_12, 0, x_40); +return x_10; +} +else +{ +lean_object* x_41; lean_object* x_42; uint8_t x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_41 = lean_ctor_get(x_27, 0); +x_42 = lean_ctor_get(x_27, 1); lean_inc(x_42); -x_43 = lean_ctor_get(x_41, 1); -lean_inc(x_43); -lean_dec(x_41); -lean_inc(x_8); -lean_inc(x_42); -lean_inc(x_40); -lean_inc(x_6); -x_44 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_6, x_40, x_42, x_8, x_43); -if (lean_obj_tag(x_44) == 0) -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; -x_45 = lean_ctor_get(x_44, 0); -lean_inc(x_45); -x_46 = lean_ctor_get(x_44, 1); -lean_inc(x_46); -lean_dec(x_44); -x_47 = lean_ctor_get(x_8, 3); -lean_inc(x_47); -lean_dec(x_8); -x_48 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_48, 0, x_6); -lean_ctor_set(x_48, 1, x_40); -lean_ctor_set(x_48, 2, x_45); -lean_ctor_set(x_48, 3, x_42); -x_49 = lean_st_ref_set(x_47, x_48, x_46); -lean_dec(x_47); -x_50 = !lean_is_exclusive(x_49); -if (x_50 == 0) -{ -return x_49; -} -else -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_49, 0); -x_52 = lean_ctor_get(x_49, 1); -lean_inc(x_52); -lean_inc(x_51); -lean_dec(x_49); -x_53 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_53, 0, x_51); -lean_ctor_set(x_53, 1, x_52); -return x_53; -} -} -else -{ -uint8_t x_54; -lean_dec(x_42); -lean_dec(x_40); -lean_dec(x_8); -lean_dec(x_6); -x_54 = !lean_is_exclusive(x_44); -if (x_54 == 0) -{ -return x_44; -} -else -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_44, 0); -x_56 = lean_ctor_get(x_44, 1); -lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_44); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); -return x_57; -} -} -} -else -{ -lean_object* x_58; lean_object* x_59; uint8_t x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_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_27, 0); -x_59 = lean_ctor_get(x_27, 1); -lean_inc(x_59); -lean_inc(x_58); +lean_inc(x_41); lean_dec(x_27); -x_60 = 1; -x_61 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_61, 0, x_58); -lean_ctor_set(x_61, 1, x_59); -lean_ctor_set_uint8(x_61, sizeof(void*)*2, x_60); -x_62 = l_Lean_Unhygienic_run___rarg___closed__2; -x_63 = lean_unsigned_to_nat(1u); -lean_ctor_set(x_16, 7, x_61); -lean_ctor_set(x_16, 5, x_63); +x_43 = 1; +x_44 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_44, 0, x_41); +lean_ctor_set(x_44, 1, x_42); +lean_ctor_set_uint8(x_44, sizeof(void*)*2, x_43); +x_45 = l_Lean_Unhygienic_run___rarg___closed__2; +x_46 = lean_unsigned_to_nat(1u); +lean_ctor_set(x_16, 7, x_44); +lean_ctor_set(x_16, 5, x_46); lean_ctor_set(x_16, 4, x_25); -lean_ctor_set(x_16, 3, x_62); +lean_ctor_set(x_16, 3, x_45); lean_ctor_set(x_16, 2, x_24); lean_ctor_set(x_16, 1, x_15); lean_ctor_set(x_16, 0, x_14); -x_64 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_64, 0, x_16); -x_65 = lean_unsigned_to_nat(0u); -x_66 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_66, 0, x_65); -lean_ctor_set(x_66, 1, x_1); -lean_ctor_set(x_66, 2, x_5); -lean_ctor_set(x_66, 3, x_64); -x_67 = l_Lean_Server_FileWorker_CancelToken_new(x_13); -x_68 = lean_ctor_get(x_67, 0); -lean_inc(x_68); -x_69 = lean_ctor_get(x_67, 1); -lean_inc(x_69); -lean_dec(x_67); -lean_inc(x_8); -lean_inc(x_68); -lean_inc(x_66); -lean_inc(x_6); -x_70 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_6, x_66, x_68, x_8, x_69); -if (lean_obj_tag(x_70) == 0) +x_47 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_47, 0, x_16); +x_48 = lean_unsigned_to_nat(0u); +x_49 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_1); +lean_ctor_set(x_49, 2, x_5); +lean_ctor_set(x_49, 3, x_47); +lean_ctor_set(x_12, 1, x_6); +lean_ctor_set(x_12, 0, x_49); +return x_10; +} +} +else { -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; -x_71 = lean_ctor_get(x_70, 0); -lean_inc(x_71); -x_72 = lean_ctor_get(x_70, 1); -lean_inc(x_72); -lean_dec(x_70); -x_73 = lean_ctor_get(x_8, 3); -lean_inc(x_73); -lean_dec(x_8); -x_74 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_74, 0, x_6); -lean_ctor_set(x_74, 1, x_66); -lean_ctor_set(x_74, 2, x_71); -lean_ctor_set(x_74, 3, x_68); -x_75 = lean_st_ref_set(x_73, x_74, x_72); -lean_dec(x_73); -x_76 = lean_ctor_get(x_75, 0); +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_50 = lean_ctor_get(x_16, 7); +x_51 = lean_ctor_get(x_16, 6); +lean_inc(x_50); +lean_inc(x_51); +lean_dec(x_16); +x_52 = lean_ctor_get(x_50, 0); +lean_inc(x_52); +x_53 = lean_ctor_get(x_50, 1); +lean_inc(x_53); +if (lean_is_exclusive(x_50)) { + lean_ctor_release(x_50, 0); + lean_ctor_release(x_50, 1); + x_54 = x_50; +} else { + lean_dec_ref(x_50); + x_54 = lean_box(0); +} +x_55 = 1; +if (lean_is_scalar(x_54)) { + x_56 = lean_alloc_ctor(0, 2, 1); +} else { + x_56 = x_54; +} +lean_ctor_set(x_56, 0, x_52); +lean_ctor_set(x_56, 1, x_53); +lean_ctor_set_uint8(x_56, sizeof(void*)*2, x_55); +x_57 = l_Lean_Unhygienic_run___rarg___closed__2; +x_58 = lean_unsigned_to_nat(1u); +x_59 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_59, 0, x_14); +lean_ctor_set(x_59, 1, x_15); +lean_ctor_set(x_59, 2, x_24); +lean_ctor_set(x_59, 3, x_57); +lean_ctor_set(x_59, 4, x_25); +lean_ctor_set(x_59, 5, x_58); +lean_ctor_set(x_59, 6, x_51); +lean_ctor_set(x_59, 7, x_56); +x_60 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_60, 0, x_59); +x_61 = lean_unsigned_to_nat(0u); +x_62 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_1); +lean_ctor_set(x_62, 2, x_5); +lean_ctor_set(x_62, 3, x_60); +lean_ctor_set(x_12, 1, x_6); +lean_ctor_set(x_12, 0, x_62); +return x_10; +} +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_63 = lean_ctor_get(x_12, 0); +x_64 = lean_ctor_get(x_12, 1); +lean_inc(x_64); +lean_inc(x_63); +lean_dec(x_12); +lean_inc(x_2); +lean_inc(x_64); +lean_inc(x_63); +x_65 = l_Lean_Elab_Command_mkState(x_63, x_64, x_2); +x_66 = l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__4; +x_67 = 0; +lean_inc(x_2); +x_68 = l_Lean_KVMap_setBool(x_2, x_66, x_67); +x_69 = l_Lean_instInhabitedParserDescr___closed__1; +x_70 = lean_box(0); +x_71 = l_Array_empty___closed__1; +lean_inc_n(x_2, 2); +x_72 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_68); +lean_ctor_set(x_72, 2, x_70); +lean_ctor_set(x_72, 3, x_2); +lean_ctor_set(x_72, 4, x_2); +lean_ctor_set(x_72, 5, x_71); +lean_inc(x_2); +x_73 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_73, 0, x_72); +lean_ctor_set(x_73, 1, x_2); +x_74 = l_Lean_getMaxRecDepth(x_2); +lean_dec(x_2); +x_75 = lean_ctor_get(x_65, 7); +lean_inc(x_75); +x_76 = lean_ctor_get(x_65, 6); lean_inc(x_76); -x_77 = lean_ctor_get(x_75, 1); -lean_inc(x_77); +if (lean_is_exclusive(x_65)) { + lean_ctor_release(x_65, 0); + lean_ctor_release(x_65, 1); + lean_ctor_release(x_65, 2); + lean_ctor_release(x_65, 3); + lean_ctor_release(x_65, 4); + lean_ctor_release(x_65, 5); + lean_ctor_release(x_65, 6); + lean_ctor_release(x_65, 7); + x_77 = x_65; +} else { + lean_dec_ref(x_65); + x_77 = lean_box(0); +} +x_78 = lean_ctor_get(x_75, 0); +lean_inc(x_78); +x_79 = lean_ctor_get(x_75, 1); +lean_inc(x_79); if (lean_is_exclusive(x_75)) { lean_ctor_release(x_75, 0); lean_ctor_release(x_75, 1); - x_78 = x_75; + x_80 = x_75; } else { lean_dec_ref(x_75); - x_78 = lean_box(0); + x_80 = lean_box(0); } -if (lean_is_scalar(x_78)) { - x_79 = lean_alloc_ctor(0, 2, 0); +x_81 = 1; +if (lean_is_scalar(x_80)) { + x_82 = lean_alloc_ctor(0, 2, 1); } else { - x_79 = x_78; + x_82 = x_80; } -lean_ctor_set(x_79, 0, x_76); -lean_ctor_set(x_79, 1, x_77); -return x_79; -} -else -{ -lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; -lean_dec(x_68); -lean_dec(x_66); -lean_dec(x_8); -lean_dec(x_6); -x_80 = lean_ctor_get(x_70, 0); -lean_inc(x_80); -x_81 = lean_ctor_get(x_70, 1); -lean_inc(x_81); -if (lean_is_exclusive(x_70)) { - lean_ctor_release(x_70, 0); - lean_ctor_release(x_70, 1); - x_82 = x_70; +lean_ctor_set(x_82, 0, x_78); +lean_ctor_set(x_82, 1, x_79); +lean_ctor_set_uint8(x_82, sizeof(void*)*2, x_81); +x_83 = l_Lean_Unhygienic_run___rarg___closed__2; +x_84 = lean_unsigned_to_nat(1u); +if (lean_is_scalar(x_77)) { + x_85 = lean_alloc_ctor(0, 8, 0); } else { - lean_dec_ref(x_70); - 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; + x_85 = x_77; } +lean_ctor_set(x_85, 0, x_63); +lean_ctor_set(x_85, 1, x_64); +lean_ctor_set(x_85, 2, x_73); +lean_ctor_set(x_85, 3, x_83); +lean_ctor_set(x_85, 4, x_74); +lean_ctor_set(x_85, 5, x_84); +lean_ctor_set(x_85, 6, x_76); +lean_ctor_set(x_85, 7, x_82); +x_86 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_86, 0, x_85); +x_87 = lean_unsigned_to_nat(0u); +x_88 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_88, 0, x_87); +lean_ctor_set(x_88, 1, x_1); +lean_ctor_set(x_88, 2, x_5); +lean_ctor_set(x_88, 3, x_86); +x_89 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_89, 0, x_88); +lean_ctor_set(x_89, 1, x_6); +lean_ctor_set(x_10, 0, x_89); +return x_10; } } else { -lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; -x_84 = lean_ctor_get(x_16, 7); -x_85 = lean_ctor_get(x_16, 6); -lean_inc(x_84); -lean_inc(x_85); -lean_dec(x_16); -x_86 = lean_ctor_get(x_84, 0); -lean_inc(x_86); -x_87 = lean_ctor_get(x_84, 1); -lean_inc(x_87); -if (lean_is_exclusive(x_84)) { - lean_ctor_release(x_84, 0); - lean_ctor_release(x_84, 1); - x_88 = x_84; +lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; uint8_t x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; uint8_t x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_90 = lean_ctor_get(x_10, 0); +x_91 = lean_ctor_get(x_10, 1); +lean_inc(x_91); +lean_inc(x_90); +lean_dec(x_10); +x_92 = lean_ctor_get(x_90, 0); +lean_inc(x_92); +x_93 = lean_ctor_get(x_90, 1); +lean_inc(x_93); +if (lean_is_exclusive(x_90)) { + lean_ctor_release(x_90, 0); + lean_ctor_release(x_90, 1); + x_94 = x_90; } else { - lean_dec_ref(x_84); - x_88 = lean_box(0); + lean_dec_ref(x_90); + x_94 = lean_box(0); } -x_89 = 1; -if (lean_is_scalar(x_88)) { - x_90 = lean_alloc_ctor(0, 2, 1); -} else { - x_90 = x_88; -} -lean_ctor_set(x_90, 0, x_86); -lean_ctor_set(x_90, 1, x_87); -lean_ctor_set_uint8(x_90, sizeof(void*)*2, x_89); -x_91 = l_Lean_Unhygienic_run___rarg___closed__2; -x_92 = lean_unsigned_to_nat(1u); -x_93 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_93, 0, x_14); -lean_ctor_set(x_93, 1, x_15); -lean_ctor_set(x_93, 2, x_24); -lean_ctor_set(x_93, 3, x_91); -lean_ctor_set(x_93, 4, x_25); -lean_ctor_set(x_93, 5, x_92); -lean_ctor_set(x_93, 6, x_85); -lean_ctor_set(x_93, 7, x_90); -x_94 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_94, 0, x_93); -x_95 = lean_unsigned_to_nat(0u); -x_96 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_96, 0, x_95); -lean_ctor_set(x_96, 1, x_1); -lean_ctor_set(x_96, 2, x_5); -lean_ctor_set(x_96, 3, x_94); -x_97 = l_Lean_Server_FileWorker_CancelToken_new(x_13); -x_98 = lean_ctor_get(x_97, 0); -lean_inc(x_98); -x_99 = lean_ctor_get(x_97, 1); -lean_inc(x_99); -lean_dec(x_97); -lean_inc(x_8); -lean_inc(x_98); -lean_inc(x_96); -lean_inc(x_6); -x_100 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_6, x_96, x_98, x_8, x_99); -if (lean_obj_tag(x_100) == 0) -{ -lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; -x_101 = lean_ctor_get(x_100, 0); -lean_inc(x_101); -x_102 = lean_ctor_get(x_100, 1); -lean_inc(x_102); -lean_dec(x_100); -x_103 = lean_ctor_get(x_8, 3); -lean_inc(x_103); -lean_dec(x_8); -x_104 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_104, 0, x_6); -lean_ctor_set(x_104, 1, x_96); -lean_ctor_set(x_104, 2, x_101); -lean_ctor_set(x_104, 3, x_98); -x_105 = lean_st_ref_set(x_103, x_104, x_102); -lean_dec(x_103); -x_106 = lean_ctor_get(x_105, 0); +lean_inc(x_2); +lean_inc(x_93); +lean_inc(x_92); +x_95 = l_Lean_Elab_Command_mkState(x_92, x_93, x_2); +x_96 = l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__4; +x_97 = 0; +lean_inc(x_2); +x_98 = l_Lean_KVMap_setBool(x_2, x_96, x_97); +x_99 = l_Lean_instInhabitedParserDescr___closed__1; +x_100 = lean_box(0); +x_101 = l_Array_empty___closed__1; +lean_inc_n(x_2, 2); +x_102 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_102, 0, x_99); +lean_ctor_set(x_102, 1, x_98); +lean_ctor_set(x_102, 2, x_100); +lean_ctor_set(x_102, 3, x_2); +lean_ctor_set(x_102, 4, x_2); +lean_ctor_set(x_102, 5, x_101); +lean_inc(x_2); +x_103 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_103, 0, x_102); +lean_ctor_set(x_103, 1, x_2); +x_104 = l_Lean_getMaxRecDepth(x_2); +lean_dec(x_2); +x_105 = lean_ctor_get(x_95, 7); +lean_inc(x_105); +x_106 = lean_ctor_get(x_95, 6); lean_inc(x_106); -x_107 = lean_ctor_get(x_105, 1); -lean_inc(x_107); +if (lean_is_exclusive(x_95)) { + lean_ctor_release(x_95, 0); + lean_ctor_release(x_95, 1); + lean_ctor_release(x_95, 2); + lean_ctor_release(x_95, 3); + lean_ctor_release(x_95, 4); + lean_ctor_release(x_95, 5); + lean_ctor_release(x_95, 6); + lean_ctor_release(x_95, 7); + x_107 = x_95; +} else { + lean_dec_ref(x_95); + x_107 = lean_box(0); +} +x_108 = lean_ctor_get(x_105, 0); +lean_inc(x_108); +x_109 = lean_ctor_get(x_105, 1); +lean_inc(x_109); if (lean_is_exclusive(x_105)) { lean_ctor_release(x_105, 0); lean_ctor_release(x_105, 1); - x_108 = x_105; + x_110 = x_105; } else { lean_dec_ref(x_105); - x_108 = lean_box(0); + x_110 = lean_box(0); } -if (lean_is_scalar(x_108)) { - x_109 = lean_alloc_ctor(0, 2, 0); +x_111 = 1; +if (lean_is_scalar(x_110)) { + x_112 = lean_alloc_ctor(0, 2, 1); } else { - x_109 = x_108; + x_112 = x_110; } -lean_ctor_set(x_109, 0, x_106); -lean_ctor_set(x_109, 1, x_107); -return x_109; -} -else -{ -lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; -lean_dec(x_98); -lean_dec(x_96); -lean_dec(x_8); -lean_dec(x_6); -x_110 = lean_ctor_get(x_100, 0); -lean_inc(x_110); -x_111 = lean_ctor_get(x_100, 1); -lean_inc(x_111); -if (lean_is_exclusive(x_100)) { - lean_ctor_release(x_100, 0); - lean_ctor_release(x_100, 1); - x_112 = x_100; +lean_ctor_set(x_112, 0, x_108); +lean_ctor_set(x_112, 1, x_109); +lean_ctor_set_uint8(x_112, sizeof(void*)*2, x_111); +x_113 = l_Lean_Unhygienic_run___rarg___closed__2; +x_114 = lean_unsigned_to_nat(1u); +if (lean_is_scalar(x_107)) { + x_115 = lean_alloc_ctor(0, 8, 0); } else { - lean_dec_ref(x_100); - x_112 = lean_box(0); + x_115 = x_107; } -if (lean_is_scalar(x_112)) { - x_113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_115, 0, x_92); +lean_ctor_set(x_115, 1, x_93); +lean_ctor_set(x_115, 2, x_103); +lean_ctor_set(x_115, 3, x_113); +lean_ctor_set(x_115, 4, x_104); +lean_ctor_set(x_115, 5, x_114); +lean_ctor_set(x_115, 6, x_106); +lean_ctor_set(x_115, 7, x_112); +x_116 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_116, 0, x_115); +x_117 = lean_unsigned_to_nat(0u); +x_118 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_118, 0, x_117); +lean_ctor_set(x_118, 1, x_1); +lean_ctor_set(x_118, 2, x_5); +lean_ctor_set(x_118, 3, x_116); +if (lean_is_scalar(x_94)) { + x_119 = lean_alloc_ctor(0, 2, 0); } else { - x_113 = x_112; -} -lean_ctor_set(x_113, 0, x_110); -lean_ctor_set(x_113, 1, x_111); -return x_113; + x_119 = x_94; } +lean_ctor_set(x_119, 0, x_118); +lean_ctor_set(x_119, 1, x_6); +x_120 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_120, 0, x_119); +lean_ctor_set(x_120, 1, x_91); +return x_120; } } else { -uint8_t x_114; -lean_dec(x_8); +uint8_t x_121; lean_dec(x_6); lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); -x_114 = !lean_is_exclusive(x_11); -if (x_114 == 0) +x_121 = !lean_is_exclusive(x_10); +if (x_121 == 0) { -return x_11; +return x_10; } else { -lean_object* x_115; lean_object* x_116; lean_object* x_117; -x_115 = lean_ctor_get(x_11, 0); -x_116 = lean_ctor_get(x_11, 1); -lean_inc(x_116); -lean_inc(x_115); -lean_dec(x_11); -x_117 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_117, 0, x_115); -lean_ctor_set(x_117, 1, x_116); -return x_117; +lean_object* x_122; lean_object* x_123; lean_object* x_124; +x_122 = lean_ctor_get(x_10, 0); +x_123 = lean_ctor_get(x_10, 1); +lean_inc(x_123); +lean_inc(x_122); +lean_dec(x_10); +x_124 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_124, 0, x_122); +lean_ctor_set(x_124, 1, x_123); +return x_124; } } } } -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___lambda__2___closed__1() { _start: { -lean_object* x_10; -x_10 = lean_io_file_exists(x_7, x_9); -if (lean_obj_tag(x_10) == 0) +lean_object* x_1; +x_1 = lean_mk_string("LEAN_SRC_PATH"); +return x_1; +} +} +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: { -lean_object* x_11; uint8_t x_12; -x_11 = lean_ctor_get(x_10, 0); -lean_inc(x_11); -x_12 = lean_unbox(x_11); -lean_dec(x_11); -if (x_12 == 0) +lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_30; lean_object* x_31; +x_30 = l_Lean_Server_FileWorker_compileHeader___lambda__2___closed__1; +x_31 = lean_io_getenv(x_30, x_9); +if (lean_obj_tag(x_31) == 0) { -lean_object* x_13; lean_object* x_14; lean_object* x_15; -lean_dec(x_7); -x_13 = lean_ctor_get(x_10, 1); -lean_inc(x_13); -lean_dec(x_10); -x_14 = lean_box(0); -x_15 = l_Lean_Server_FileWorker_compileDocument___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_14, x_8, x_13); -return x_15; +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +lean_dec(x_31); +x_34 = lean_io_file_exists(x_8, x_33); +if (lean_obj_tag(x_32) == 0) +{ +if (lean_obj_tag(x_34) == 0) +{ +lean_object* x_35; lean_object* x_36; uint8_t x_37; +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_34, 1); +lean_inc(x_36); +lean_dec(x_34); +x_37 = lean_unbox(x_35); +lean_dec(x_35); +lean_inc(x_2); +x_10 = x_2; +x_11 = x_37; +x_12 = x_36; +goto block_29; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_16 = lean_ctor_get(x_10, 1); -lean_inc(x_16); -lean_dec(x_10); -x_17 = l_Lean_Elab_headerToImports(x_1); -x_18 = l_List_redLength___rarg(x_17); -x_19 = lean_mk_empty_array_with_capacity(x_18); -lean_dec(x_18); -x_20 = l_List_toArrayAux___rarg(x_17, x_19); -lean_inc(x_8); -lean_inc(x_6); -x_21 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath(x_7, x_6, x_20, x_8, x_16); -if (lean_obj_tag(x_21) == 0) -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = lean_ctor_get(x_21, 0); -lean_inc(x_22); -x_23 = lean_ctor_get(x_21, 1); -lean_inc(x_23); -lean_dec(x_21); -x_24 = l_Lean_Server_FileWorker_compileDocument___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_22, x_8, x_23); -lean_dec(x_22); -return x_24; -} -else -{ -uint8_t x_25; +uint8_t x_38; lean_dec(x_8); +lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_25 = !lean_is_exclusive(x_21); +x_38 = !lean_is_exclusive(x_34); +if (x_38 == 0) +{ +return x_34; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_34, 0); +x_40 = lean_ctor_get(x_34, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_34); +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; +} +} +} +else +{ +if (lean_obj_tag(x_34) == 0) +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; +x_42 = lean_ctor_get(x_32, 0); +lean_inc(x_42); +lean_dec(x_32); +x_43 = lean_ctor_get(x_34, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_34, 1); +lean_inc(x_44); +lean_dec(x_34); +lean_inc(x_2); +x_45 = l_Lean_parseSearchPath(x_42, x_2); +lean_dec(x_42); +x_46 = lean_unbox(x_43); +lean_dec(x_43); +x_10 = x_45; +x_11 = x_46; +x_12 = x_44; +goto block_29; +} +else +{ +uint8_t x_47; +lean_dec(x_32); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_47 = !lean_is_exclusive(x_34); +if (x_47 == 0) +{ +return x_34; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_34, 0); +x_49 = lean_ctor_get(x_34, 1); +lean_inc(x_49); +lean_inc(x_48); +lean_dec(x_34); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_48); +lean_ctor_set(x_50, 1, x_49); +return x_50; +} +} +} +} +else +{ +uint8_t x_51; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_51 = !lean_is_exclusive(x_31); +if (x_51 == 0) +{ +return x_31; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_31, 0); +x_53 = lean_ctor_get(x_31, 1); +lean_inc(x_53); +lean_inc(x_52); +lean_dec(x_31); +x_54 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +return x_54; +} +} +block_29: +{ +if (x_11 == 0) +{ +lean_object* x_13; lean_object* x_14; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_13 = lean_box(0); +x_14 = l_Lean_Server_FileWorker_compileHeader___lambda__1(x_1, x_2, x_3, x_4, x_5, x_10, x_13, x_12); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = l_Lean_Elab_headerToImports(x_1); +x_16 = l_List_redLength___rarg(x_15); +x_17 = lean_mk_empty_array_with_capacity(x_16); +lean_dec(x_16); +x_18 = l_List_toArrayAux___rarg(x_15, x_17); +x_19 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath(x_8, x_6, x_18, x_7, x_12); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = l_List_append___rarg(x_10, x_20); +x_23 = lean_box(0); +x_24 = l_Lean_Server_FileWorker_compileHeader___lambda__1(x_1, x_2, x_3, x_4, x_5, x_22, x_23, x_21); +return x_24; +} +else +{ +uint8_t x_25; +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_25 = !lean_is_exclusive(x_19); if (x_25 == 0) { -return x_21; +return x_19; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_21, 0); -x_27 = lean_ctor_get(x_21, 1); +x_26 = lean_ctor_get(x_19, 0); +x_27 = lean_ctor_get(x_19, 1); lean_inc(x_27); lean_inc(x_26); -lean_dec(x_21); +lean_dec(x_19); x_28 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); @@ -5899,38 +6153,9 @@ return x_28; } } } -else -{ -uint8_t x_29; -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_29 = !lean_is_exclusive(x_10); -if (x_29 == 0) -{ -return x_10; -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_30 = lean_ctor_get(x_10, 0); -x_31 = lean_ctor_get(x_10, 1); -lean_inc(x_31); -lean_inc(x_30); -lean_dec(x_10); -x_32 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_32, 0, x_30); -lean_ctor_set(x_32, 1, x_31); -return x_32; } } -} -} -static lean_object* _init_l_Lean_Server_FileWorker_compileDocument___closed__1() { +static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__1() { _start: { lean_object* x_1; @@ -5938,7 +6163,7 @@ x_1 = lean_mk_string("LEAN_SYSROOT"); return x_1; } } -static lean_object* _init_l_Lean_Server_FileWorker_compileDocument___closed__2() { +static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__2() { _start: { lean_object* x_1; @@ -5946,7 +6171,7 @@ x_1 = lean_mk_string("/leanpkg"); return x_1; } } -static lean_object* _init_l_Lean_Server_FileWorker_compileDocument___closed__3() { +static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__3() { _start: { lean_object* x_1; @@ -5954,7 +6179,7 @@ x_1 = lean_mk_string("/bin/leanpkg"); return x_1; } } -lean_object* l_Lean_Server_FileWorker_compileDocument(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_FileWorker_compileHeader(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; @@ -5986,7 +6211,7 @@ lean_inc(x_14); x_15 = lean_ctor_get(x_11, 1); lean_inc(x_15); lean_dec(x_11); -x_16 = l_Lean_Server_FileWorker_compileDocument___closed__1; +x_16 = l_Lean_Server_FileWorker_compileHeader___closed__1; x_17 = lean_io_getenv(x_16, x_12); if (lean_obj_tag(x_17) == 0) { @@ -5999,7 +6224,7 @@ lean_object* x_19; lean_object* x_20; x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); -x_20 = l_IO_appDir___at_Lean_Server_FileWorker_compileDocument___spec__3(x_2, x_19); +x_20 = l_IO_appDir___at_Lean_getBuiltinSearchPath___spec__1(x_19); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; @@ -6011,12 +6236,12 @@ lean_dec(x_20); x_23 = l_Lean_instInhabitedParserDescr___closed__1; x_24 = lean_string_append(x_23, x_21); lean_dec(x_21); -x_25 = l_Lean_Server_FileWorker_compileDocument___closed__2; +x_25 = l_Lean_Server_FileWorker_compileHeader___closed__2; x_26 = lean_string_append(x_24, x_25); x_27 = l_System_FilePath_exeSuffix; x_28 = lean_string_append(x_26, x_27); x_29 = lean_string_append(x_28, x_23); -x_30 = l_Lean_Server_FileWorker_compileDocument___lambda__2(x_13, x_4, x_15, x_8, x_14, x_1, x_29, x_2, x_22); +x_30 = l_Lean_Server_FileWorker_compileHeader___lambda__2(x_13, x_4, x_15, x_8, x_14, x_1, x_2, x_29, x_22); lean_dec(x_8); return x_30; } @@ -6061,12 +6286,12 @@ lean_dec(x_18); x_37 = l_Lean_instInhabitedParserDescr___closed__1; x_38 = lean_string_append(x_37, x_36); lean_dec(x_36); -x_39 = l_Lean_Server_FileWorker_compileDocument___closed__3; +x_39 = l_Lean_Server_FileWorker_compileHeader___closed__3; x_40 = lean_string_append(x_38, x_39); x_41 = l_System_FilePath_exeSuffix; x_42 = lean_string_append(x_40, x_41); x_43 = lean_string_append(x_42, x_37); -x_44 = l_Lean_Server_FileWorker_compileDocument___lambda__2(x_13, x_4, x_15, x_8, x_14, x_1, x_43, x_2, x_35); +x_44 = l_Lean_Server_FileWorker_compileHeader___lambda__2(x_13, x_4, x_15, x_8, x_14, x_1, x_2, x_43, x_35); lean_dec(x_8); return x_44; } @@ -6127,72 +6352,296 @@ return x_52; } } } -lean_object* l_IO_getEnv___at_Lean_Server_FileWorker_compileDocument___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_4; -x_4 = l_IO_getEnv___at_Lean_Server_FileWorker_compileDocument___spec__1(x_1, x_2, x_3); -lean_dec(x_2); -lean_dec(x_1); -return x_4; +lean_object* x_9; +x_9 = l_Lean_Server_FileWorker_compileHeader___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_4); +return x_9; } } -lean_object* l_IO_fileExists___at_Lean_Server_FileWorker_compileDocument___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { -lean_object* x_4; -x_4 = l_IO_fileExists___at_Lean_Server_FileWorker_compileDocument___spec__2(x_1, x_2, x_3); -lean_dec(x_2); +lean_object* x_10; +x_10 = l_Lean_Server_FileWorker_compileHeader___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_4); +return x_10; +} +} +lean_object* l_Lean_Server_FileWorker_initializeWorker_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); -return x_4; +x_5 = lean_apply_2(x_2, x_3, x_4); +return x_5; } } -lean_object* l_IO_appPath___at_Lean_Server_FileWorker_compileDocument___spec__4___boxed(lean_object* x_1) { +lean_object* l_Lean_Server_FileWorker_initializeWorker_match__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_IO_appPath___at_Lean_Server_FileWorker_compileDocument___spec__4(x_1); -lean_dec(x_1); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_initializeWorker_match__1___rarg), 2, 0); return x_2; } } -lean_object* l_IO_realPath___at_Lean_Server_FileWorker_compileDocument___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; uint8_t x_4; +x_3 = lean_st_mk_ref(x_1, x_2); +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +return x_3; +} +else +{ +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_3, 1); +lean_inc(x_6); +lean_inc(x_5); +lean_dec(x_3); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_5); +lean_ctor_set(x_7, 1, x_6); +return x_7; +} +} +} +lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; uint8_t x_4; +x_3 = lean_st_mk_ref(x_1, x_2); +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +return x_3; +} +else +{ +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_3, 1); +lean_inc(x_6); +lean_inc(x_5); +lean_dec(x_3); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_5); +lean_ctor_set(x_7, 1, x_6); +return x_7; +} +} +} +lean_object* l_Lean_Server_FileWorker_initializeWorker(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_1, 2); +lean_inc(x_7); +x_8 = lean_ctor_get(x_1, 3); +lean_inc(x_8); +lean_dec(x_1); +x_9 = l_Lean_FileMap_ofString(x_8); +x_10 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_10, 0, x_6); +lean_ctor_set(x_10, 1, x_7); +lean_ctor_set(x_10, 2, x_9); +lean_inc(x_3); +lean_inc(x_10); +x_11 = l_Lean_Server_FileWorker_compileHeader(x_10, x_3, x_5); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +x_14 = lean_ctor_get(x_12, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_dec(x_12); +x_16 = l_Lean_Server_FileWorker_CancelToken_new(x_13); +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); +lean_inc(x_3); +lean_inc(x_17); +lean_inc(x_14); +lean_inc(x_10); +x_19 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_10, x_14, x_17, x_3, x_18); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_22, 0, x_10); +lean_ctor_set(x_22, 1, x_14); +lean_ctor_set(x_22, 2, x_20); +lean_ctor_set(x_22, 3, x_17); +x_23 = l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__1(x_22, x_21); +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = lean_box(0); +x_27 = l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__2(x_26, x_25); +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; +x_29 = lean_ctor_get(x_27, 0); +x_30 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_30, 0, x_2); +lean_ctor_set(x_30, 1, x_3); +lean_ctor_set(x_30, 2, x_4); +lean_ctor_set(x_30, 3, x_15); +lean_ctor_set(x_30, 4, x_24); +lean_ctor_set(x_30, 5, x_29); +lean_ctor_set(x_27, 0, x_30); +return x_27; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_31 = lean_ctor_get(x_27, 0); +x_32 = lean_ctor_get(x_27, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_27); +x_33 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_33, 0, x_2); +lean_ctor_set(x_33, 1, x_3); +lean_ctor_set(x_33, 2, x_4); +lean_ctor_set(x_33, 3, x_15); +lean_ctor_set(x_33, 4, x_24); +lean_ctor_set(x_33, 5, x_31); +x_34 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_34, 1, x_32); +return x_34; +} +} +else +{ +uint8_t x_35; +lean_dec(x_17); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_35 = !lean_is_exclusive(x_19); +if (x_35 == 0) +{ +return x_19; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_19, 0); +x_37 = lean_ctor_get(x_19, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_19); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +} +else +{ +uint8_t x_39; +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_39 = !lean_is_exclusive(x_11); +if (x_39 == 0) +{ +return x_11; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_11, 0); +x_41 = lean_ctor_get(x_11, 1); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_11); +x_42 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_42, 0, x_40); +lean_ctor_set(x_42, 1, x_41); +return x_42; +} +} +} +} +lean_object* l_Lean_Server_FileWorker_updatePendingRequests(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_4 = lean_ctor_get(x_2, 5); +x_5 = lean_st_ref_take(x_4, x_3); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_apply_1(x_1, x_6); +x_9 = lean_st_ref_set(x_4, x_8, x_7); +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +return x_9; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_9, 0); +x_12 = lean_ctor_get(x_9, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_9); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_11); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +} +} +lean_object* l_Lean_Server_FileWorker_updatePendingRequests___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_IO_realPath___at_Lean_Server_FileWorker_compileDocument___spec__5(x_1, x_2, x_3); +x_4 = l_Lean_Server_FileWorker_updatePendingRequests(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } -lean_object* l_IO_appDir___at_Lean_Server_FileWorker_compileDocument___spec__3___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_appDir___at_Lean_Server_FileWorker_compileDocument___spec__3(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -lean_object* x_10; -x_10 = l_Lean_Server_FileWorker_compileDocument___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -lean_dec(x_7); -lean_dec(x_4); -return x_10; -} -} -lean_object* l_Lean_Server_FileWorker_compileDocument___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -lean_object* x_10; -x_10 = l_Lean_Server_FileWorker_compileDocument___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -lean_dec(x_4); -return x_10; -} -} lean_object* l_Lean_Server_FileWorker_updateDocument_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -6371,77 +6820,80 @@ lean_dec(x_3); return x_4; } } -lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_9 = l_Lean_Server_FileWorker_CancelToken_new(x_8); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 1); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_10 = l_Lean_Server_FileWorker_CancelToken_new(x_9); +x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); -lean_dec(x_9); -lean_inc(x_10); -lean_inc(x_1); -x_12 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_1, x_5, x_10, x_7, x_11); -if (lean_obj_tag(x_12) == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_12, 1); -lean_inc(x_14); -lean_dec(x_12); -x_15 = l_IO_AsyncList_ofList___rarg(x_4); -x_16 = l_IO_AsyncList_append___rarg(x_15, x_13); -x_17 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_17, 0, x_1); -lean_ctor_set(x_17, 1, x_2); -lean_ctor_set(x_17, 2, x_16); -lean_ctor_set(x_17, 3, x_10); -x_18 = lean_st_ref_set(x_3, x_17, x_14); -x_19 = !lean_is_exclusive(x_18); -if (x_19 == 0) -{ -return x_18; -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_20 = lean_ctor_get(x_18, 0); -x_21 = lean_ctor_get(x_18, 1); -lean_inc(x_21); -lean_inc(x_20); -lean_dec(x_18); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_20); -lean_ctor_set(x_22, 1, x_21); -return x_22; -} -} -else -{ -uint8_t x_23; +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); lean_dec(x_10); -lean_dec(x_2); +x_13 = lean_ctor_get(x_1, 1); +lean_inc(x_13); lean_dec(x_1); -x_23 = !lean_is_exclusive(x_12); -if (x_23 == 0) +lean_inc(x_11); +lean_inc(x_2); +x_14 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_2, x_6, x_11, x_13, x_12); +if (lean_obj_tag(x_14) == 0) { -return x_12; +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = l_IO_AsyncList_ofList___rarg(x_5); +x_18 = l_IO_AsyncList_append___rarg(x_17, x_15); +x_19 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_19, 0, x_2); +lean_ctor_set(x_19, 1, x_3); +lean_ctor_set(x_19, 2, x_18); +lean_ctor_set(x_19, 3, x_11); +x_20 = lean_st_ref_set(x_4, x_19, x_16); +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +return x_20; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_12, 0); -x_25 = lean_ctor_get(x_12, 1); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_12); -x_26 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_26, 0, x_24); -lean_ctor_set(x_26, 1, x_25); -return x_26; +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_20, 0); +x_23 = lean_ctor_get(x_20, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_20); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); +return x_24; +} +} +else +{ +uint8_t x_25; +lean_dec(x_11); +lean_dec(x_3); +lean_dec(x_2); +x_25 = !lean_is_exclusive(x_14); +if (x_25 == 0) +{ +return x_14; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_14, 0); +x_27 = lean_ctor_get(x_14, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_14); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; } } } @@ -6454,431 +6906,437 @@ x_1 = lean_mk_string("Internal server error: elab task was aborted while still i return x_1; } } -lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_10; lean_object* x_11; -x_10 = lean_ctor_get(x_1, 2); -lean_inc(x_10); -x_11 = l_IO_AsyncList_updateFinishedPrefix___rarg(x_10, x_9); -if (lean_obj_tag(x_11) == 0) +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_1, 2); +lean_inc(x_11); +x_12 = l_IO_AsyncList_updateFinishedPrefix___rarg(x_11, x_10); +if (lean_obj_tag(x_12) == 0) { -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_12, 1); +lean_object* x_13; lean_object* x_14; +x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); -if (lean_obj_tag(x_13) == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_14 = lean_ctor_get(x_11, 1); +x_14 = lean_ctor_get(x_13, 1); lean_inc(x_14); -lean_dec(x_11); -x_15 = lean_ctor_get(x_12, 0); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; +x_15 = lean_ctor_get(x_12, 1); lean_inc(x_15); lean_dec(x_12); -x_16 = lean_ctor_get(x_1, 3); +x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); -lean_dec(x_1); -x_17 = l_Lean_Server_FileWorker_CancelToken_set(x_16, x_14); -lean_dec(x_16); -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); -x_19 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_updateDocument___lambda__1___boxed), 2, 1); -lean_closure_set(x_19, 0, x_2); -x_20 = l_IO_AsyncList_finishedPrefix___rarg(x_15); -lean_dec(x_15); -x_21 = l_List_takeWhile___rarg(x_19, x_20); -x_22 = lean_unsigned_to_nat(0u); -x_23 = l_List_lengthAux___rarg(x_21, x_22); -x_24 = lean_nat_dec_eq(x_23, x_22); -if (x_24 == 0) -{ -lean_object* x_25; lean_object* x_26; lean_object* x_38; uint8_t x_39; -lean_inc(x_21); -x_25 = l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocument___spec__1(x_21); -x_38 = lean_unsigned_to_nat(2u); -x_39 = lean_nat_dec_le(x_38, x_23); -if (x_39 == 0) -{ -lean_dec(x_23); -lean_inc(x_5); -x_26 = x_5; -goto block_37; -} -else -{ -lean_object* x_40; lean_object* x_41; -x_40 = lean_nat_sub(x_23, x_38); -lean_dec(x_23); -x_41 = l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(x_40, x_21); -x_26 = x_41; -goto block_37; -} -block_37: -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -lean_inc(x_26); -x_27 = l_Lean_Server_Snapshots_parseNextCmd(x_3, x_26, x_18); -x_28 = lean_ctor_get(x_27, 0); -lean_inc(x_28); -x_29 = lean_ctor_get(x_27, 1); -lean_inc(x_29); -lean_dec(x_27); -x_30 = lean_ctor_get(x_25, 1); -lean_inc(x_30); -x_31 = l_Lean_Syntax_structEq(x_28, x_30); -lean_dec(x_30); -lean_dec(x_28); -if (x_31 == 0) -{ -lean_object* x_32; lean_object* x_33; lean_object* x_34; -lean_dec(x_25); -x_32 = l_List_dropLast___rarg(x_21); -x_33 = lean_box(0); -x_34 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_32, x_26, x_33, x_8, x_29); -lean_dec(x_32); -return x_34; -} -else -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_26); -x_35 = lean_box(0); -x_36 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_21, x_25, x_35, x_8, x_29); -lean_dec(x_21); -return x_36; -} -} -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; -lean_dec(x_23); -lean_dec(x_21); -lean_dec(x_3); -x_42 = l_Lean_Server_FileWorker_CancelToken_new(x_18); -x_43 = lean_ctor_get(x_42, 0); -lean_inc(x_43); -x_44 = lean_ctor_get(x_42, 1); -lean_inc(x_44); -lean_dec(x_42); -lean_inc(x_43); -lean_inc(x_5); -lean_inc(x_4); -x_45 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_4, x_5, x_43, x_8, x_44); -if (lean_obj_tag(x_45) == 0) -{ -lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; -x_46 = lean_ctor_get(x_45, 0); -lean_inc(x_46); -x_47 = lean_ctor_get(x_45, 1); -lean_inc(x_47); -lean_dec(x_45); -x_48 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_48, 0, x_4); -lean_ctor_set(x_48, 1, x_5); -lean_ctor_set(x_48, 2, x_46); -lean_ctor_set(x_48, 3, x_43); -x_49 = lean_st_ref_set(x_6, x_48, x_47); -x_50 = !lean_is_exclusive(x_49); -if (x_50 == 0) -{ -return x_49; -} -else -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_49, 0); -x_52 = lean_ctor_get(x_49, 1); -lean_inc(x_52); -lean_inc(x_51); -lean_dec(x_49); -x_53 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_53, 0, x_51); -lean_ctor_set(x_53, 1, x_52); -return x_53; -} -} -else -{ -uint8_t x_54; -lean_dec(x_43); -lean_dec(x_5); -lean_dec(x_4); -x_54 = !lean_is_exclusive(x_45); -if (x_54 == 0) -{ -return x_45; -} -else -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_45, 0); -x_56 = lean_ctor_get(x_45, 1); -lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_45); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); -return x_57; -} -} -} -} -else -{ -lean_object* x_58; -x_58 = lean_ctor_get(x_13, 0); -lean_inc(x_58); lean_dec(x_13); -switch (lean_obj_tag(x_58)) { +x_17 = lean_ctor_get(x_1, 3); +lean_inc(x_17); +lean_dec(x_1); +x_18 = l_Lean_Server_FileWorker_CancelToken_set(x_17, x_15); +lean_dec(x_17); +x_19 = lean_ctor_get(x_18, 1); +lean_inc(x_19); +lean_dec(x_18); +x_20 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_updateDocument___lambda__1___boxed), 2, 1); +lean_closure_set(x_20, 0, x_2); +x_21 = l_IO_AsyncList_finishedPrefix___rarg(x_16); +lean_dec(x_16); +x_22 = l_List_takeWhile___rarg(x_20, x_21); +x_23 = lean_unsigned_to_nat(0u); +x_24 = l_List_lengthAux___rarg(x_22, x_23); +x_25 = lean_nat_dec_eq(x_24, x_23); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_39; uint8_t x_40; +lean_inc(x_22); +x_26 = l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocument___spec__1(x_22); +x_39 = lean_unsigned_to_nat(2u); +x_40 = lean_nat_dec_le(x_39, x_24); +if (x_40 == 0) +{ +lean_dec(x_24); +lean_inc(x_6); +x_27 = x_6; +goto block_38; +} +else +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_nat_sub(x_24, x_39); +lean_dec(x_24); +x_42 = l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(x_41, x_22); +x_27 = x_42; +goto block_38; +} +block_38: +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; +lean_inc(x_27); +x_28 = l_Lean_Server_Snapshots_parseNextCmd(x_3, x_27, x_19); +x_29 = lean_ctor_get(x_28, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_28, 1); +lean_inc(x_30); +lean_dec(x_28); +x_31 = lean_ctor_get(x_26, 1); +lean_inc(x_31); +x_32 = l_Lean_Syntax_structEq(x_29, x_31); +lean_dec(x_31); +lean_dec(x_29); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_26); +x_33 = l_List_dropLast___rarg(x_22); +x_34 = lean_box(0); +x_35 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_7, x_33, x_27, x_34, x_9, x_30); +lean_dec(x_33); +return x_35; +} +else +{ +lean_object* x_36; lean_object* x_37; +lean_dec(x_27); +x_36 = lean_box(0); +x_37 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_7, x_22, x_26, x_36, x_9, x_30); +lean_dec(x_22); +return x_37; +} +} +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +lean_dec(x_24); +lean_dec(x_22); +lean_dec(x_3); +x_43 = l_Lean_Server_FileWorker_CancelToken_new(x_19); +x_44 = lean_ctor_get(x_43, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_43, 1); +lean_inc(x_45); +lean_dec(x_43); +x_46 = lean_ctor_get(x_4, 1); +lean_inc(x_46); +lean_dec(x_4); +lean_inc(x_44); +lean_inc(x_6); +lean_inc(x_5); +x_47 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_5, x_6, x_44, x_46, x_45); +if (lean_obj_tag(x_47) == 0) +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; +x_48 = lean_ctor_get(x_47, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_47, 1); +lean_inc(x_49); +lean_dec(x_47); +x_50 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_50, 0, x_5); +lean_ctor_set(x_50, 1, x_6); +lean_ctor_set(x_50, 2, x_48); +lean_ctor_set(x_50, 3, x_44); +x_51 = lean_st_ref_set(x_7, x_50, x_49); +x_52 = !lean_is_exclusive(x_51); +if (x_52 == 0) +{ +return x_51; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_51, 0); +x_54 = lean_ctor_get(x_51, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_51); +x_55 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_55, 0, x_53); +lean_ctor_set(x_55, 1, x_54); +return x_55; +} +} +else +{ +uint8_t x_56; +lean_dec(x_44); +lean_dec(x_6); +lean_dec(x_5); +x_56 = !lean_is_exclusive(x_47); +if (x_56 == 0) +{ +return x_47; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_47, 0); +x_58 = lean_ctor_get(x_47, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_47); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +return x_59; +} +} +} +} +else +{ +lean_object* x_60; +x_60 = lean_ctor_get(x_14, 0); +lean_inc(x_60); +lean_dec(x_14); +switch (lean_obj_tag(x_60)) { case 0: { -lean_object* x_59; lean_object* x_60; lean_object* x_61; -lean_dec(x_12); -lean_dec(x_8); +lean_object* x_61; lean_object* x_62; lean_object* x_63; +lean_dec(x_13); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_59 = lean_ctor_get(x_11, 1); -lean_inc(x_59); -lean_dec(x_11); -x_60 = l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1; -x_61 = l_IO_throwServerError___rarg(x_60, x_59); -return x_61; +x_61 = lean_ctor_get(x_12, 1); +lean_inc(x_61); +lean_dec(x_12); +x_62 = l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1; +x_63 = l_IO_throwServerError___rarg(x_62, x_61); +return x_63; } case 1: { -lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; uint8_t x_72; -x_62 = lean_ctor_get(x_11, 1); -lean_inc(x_62); -lean_dec(x_11); -x_63 = lean_ctor_get(x_12, 0); -lean_inc(x_63); -lean_dec(x_12); -x_64 = lean_ctor_get(x_1, 3); +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; uint8_t x_74; +x_64 = lean_ctor_get(x_12, 1); lean_inc(x_64); -lean_dec(x_1); -x_65 = l_Lean_Server_FileWorker_CancelToken_set(x_64, x_62); -lean_dec(x_64); -x_66 = lean_ctor_get(x_65, 1); +lean_dec(x_12); +x_65 = lean_ctor_get(x_13, 0); +lean_inc(x_65); +lean_dec(x_13); +x_66 = lean_ctor_get(x_1, 3); lean_inc(x_66); +lean_dec(x_1); +x_67 = l_Lean_Server_FileWorker_CancelToken_set(x_66, x_64); +lean_dec(x_66); +x_68 = lean_ctor_get(x_67, 1); +lean_inc(x_68); +lean_dec(x_67); +x_69 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_updateDocument___lambda__1___boxed), 2, 1); +lean_closure_set(x_69, 0, x_2); +x_70 = l_IO_AsyncList_finishedPrefix___rarg(x_65); lean_dec(x_65); -x_67 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_updateDocument___lambda__1___boxed), 2, 1); -lean_closure_set(x_67, 0, x_2); -x_68 = l_IO_AsyncList_finishedPrefix___rarg(x_63); -lean_dec(x_63); -x_69 = l_List_takeWhile___rarg(x_67, x_68); -x_70 = lean_unsigned_to_nat(0u); -x_71 = l_List_lengthAux___rarg(x_69, x_70); -x_72 = lean_nat_dec_eq(x_71, x_70); -if (x_72 == 0) +x_71 = l_List_takeWhile___rarg(x_69, x_70); +x_72 = lean_unsigned_to_nat(0u); +x_73 = l_List_lengthAux___rarg(x_71, x_72); +x_74 = lean_nat_dec_eq(x_73, x_72); +if (x_74 == 0) { -lean_object* x_73; lean_object* x_74; lean_object* x_86; uint8_t x_87; -lean_inc(x_69); -x_73 = l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocument___spec__1(x_69); -x_86 = lean_unsigned_to_nat(2u); -x_87 = lean_nat_dec_le(x_86, x_71); -if (x_87 == 0) +lean_object* x_75; lean_object* x_76; lean_object* x_88; uint8_t x_89; +lean_inc(x_71); +x_75 = l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocument___spec__1(x_71); +x_88 = lean_unsigned_to_nat(2u); +x_89 = lean_nat_dec_le(x_88, x_73); +if (x_89 == 0) { -lean_dec(x_71); -lean_inc(x_5); -x_74 = x_5; -goto block_85; -} -else -{ -lean_object* x_88; lean_object* x_89; -x_88 = lean_nat_sub(x_71, x_86); -lean_dec(x_71); -x_89 = l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(x_88, x_69); -x_74 = x_89; -goto block_85; -} -block_85: -{ -lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; uint8_t x_79; -lean_inc(x_74); -x_75 = l_Lean_Server_Snapshots_parseNextCmd(x_3, x_74, x_66); -x_76 = lean_ctor_get(x_75, 0); -lean_inc(x_76); -x_77 = lean_ctor_get(x_75, 1); -lean_inc(x_77); -lean_dec(x_75); -x_78 = lean_ctor_get(x_73, 1); -lean_inc(x_78); -x_79 = l_Lean_Syntax_structEq(x_76, x_78); -lean_dec(x_78); -lean_dec(x_76); -if (x_79 == 0) -{ -lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_dec(x_73); -x_80 = l_List_dropLast___rarg(x_69); -x_81 = lean_box(0); -x_82 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_80, x_74, x_81, x_8, x_77); -lean_dec(x_80); -return x_82; +lean_inc(x_6); +x_76 = x_6; +goto block_87; } else { -lean_object* x_83; lean_object* x_84; -lean_dec(x_74); +lean_object* x_90; lean_object* x_91; +x_90 = lean_nat_sub(x_73, x_88); +lean_dec(x_73); +x_91 = l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(x_90, x_71); +x_76 = x_91; +goto block_87; +} +block_87: +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_81; +lean_inc(x_76); +x_77 = l_Lean_Server_Snapshots_parseNextCmd(x_3, x_76, x_68); +x_78 = lean_ctor_get(x_77, 0); +lean_inc(x_78); +x_79 = lean_ctor_get(x_77, 1); +lean_inc(x_79); +lean_dec(x_77); +x_80 = lean_ctor_get(x_75, 1); +lean_inc(x_80); +x_81 = l_Lean_Syntax_structEq(x_78, x_80); +lean_dec(x_80); +lean_dec(x_78); +if (x_81 == 0) +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; +lean_dec(x_75); +x_82 = l_List_dropLast___rarg(x_71); x_83 = lean_box(0); -x_84 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_69, x_73, x_83, x_8, x_77); -lean_dec(x_69); +x_84 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_7, x_82, x_76, x_83, x_9, x_79); +lean_dec(x_82); return x_84; } -} -} else { -lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +lean_object* x_85; lean_object* x_86; +lean_dec(x_76); +x_85 = lean_box(0); +x_86 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_7, x_71, x_75, x_85, x_9, x_79); +lean_dec(x_71); +return x_86; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +lean_dec(x_73); lean_dec(x_71); -lean_dec(x_69); lean_dec(x_3); -x_90 = l_Lean_Server_FileWorker_CancelToken_new(x_66); -x_91 = lean_ctor_get(x_90, 0); -lean_inc(x_91); -x_92 = lean_ctor_get(x_90, 1); -lean_inc(x_92); -lean_dec(x_90); -lean_inc(x_91); -lean_inc(x_5); -lean_inc(x_4); -x_93 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_4, x_5, x_91, x_8, x_92); -if (lean_obj_tag(x_93) == 0) -{ -lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; uint8_t x_98; -x_94 = lean_ctor_get(x_93, 0); +x_92 = l_Lean_Server_FileWorker_CancelToken_new(x_68); +x_93 = lean_ctor_get(x_92, 0); +lean_inc(x_93); +x_94 = lean_ctor_get(x_92, 1); lean_inc(x_94); -x_95 = lean_ctor_get(x_93, 1); +lean_dec(x_92); +x_95 = lean_ctor_get(x_4, 1); lean_inc(x_95); -lean_dec(x_93); -x_96 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_96, 0, x_4); -lean_ctor_set(x_96, 1, x_5); -lean_ctor_set(x_96, 2, x_94); -lean_ctor_set(x_96, 3, x_91); -x_97 = lean_st_ref_set(x_6, x_96, x_95); -x_98 = !lean_is_exclusive(x_97); -if (x_98 == 0) -{ -return x_97; -} -else -{ -lean_object* x_99; lean_object* x_100; lean_object* x_101; -x_99 = lean_ctor_get(x_97, 0); -x_100 = lean_ctor_get(x_97, 1); -lean_inc(x_100); -lean_inc(x_99); -lean_dec(x_97); -x_101 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_101, 0, x_99); -lean_ctor_set(x_101, 1, x_100); -return x_101; -} -} -else -{ -uint8_t x_102; -lean_dec(x_91); -lean_dec(x_5); lean_dec(x_4); -x_102 = !lean_is_exclusive(x_93); -if (x_102 == 0) +lean_inc(x_93); +lean_inc(x_6); +lean_inc(x_5); +x_96 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_5, x_6, x_93, x_95, x_94); +if (lean_obj_tag(x_96) == 0) { -return x_93; +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; uint8_t x_101; +x_97 = lean_ctor_get(x_96, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_96, 1); +lean_inc(x_98); +lean_dec(x_96); +x_99 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_99, 0, x_5); +lean_ctor_set(x_99, 1, x_6); +lean_ctor_set(x_99, 2, x_97); +lean_ctor_set(x_99, 3, x_93); +x_100 = lean_st_ref_set(x_7, x_99, x_98); +x_101 = !lean_is_exclusive(x_100); +if (x_101 == 0) +{ +return x_100; } else { -lean_object* x_103; lean_object* x_104; lean_object* x_105; -x_103 = lean_ctor_get(x_93, 0); -x_104 = lean_ctor_get(x_93, 1); -lean_inc(x_104); +lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_102 = lean_ctor_get(x_100, 0); +x_103 = lean_ctor_get(x_100, 1); lean_inc(x_103); +lean_inc(x_102); +lean_dec(x_100); +x_104 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_104, 0, x_102); +lean_ctor_set(x_104, 1, x_103); +return x_104; +} +} +else +{ +uint8_t x_105; lean_dec(x_93); -x_105 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_105, 0, x_103); -lean_ctor_set(x_105, 1, x_104); -return x_105; +lean_dec(x_6); +lean_dec(x_5); +x_105 = !lean_is_exclusive(x_96); +if (x_105 == 0) +{ +return x_96; +} +else +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; +x_106 = lean_ctor_get(x_96, 0); +x_107 = lean_ctor_get(x_96, 1); +lean_inc(x_107); +lean_inc(x_106); +lean_dec(x_96); +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; } } } } default: { -uint8_t x_106; +uint8_t x_109; +lean_dec(x_13); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_109 = !lean_is_exclusive(x_12); +if (x_109 == 0) +{ +lean_object* x_110; lean_object* x_111; +x_110 = lean_ctor_get(x_12, 0); +lean_dec(x_110); +x_111 = lean_ctor_get(x_60, 0); +lean_inc(x_111); +lean_dec(x_60); +lean_ctor_set_tag(x_12, 1); +lean_ctor_set(x_12, 0, x_111); +return x_12; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_112 = lean_ctor_get(x_12, 1); +lean_inc(x_112); lean_dec(x_12); -lean_dec(x_8); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_106 = !lean_is_exclusive(x_11); -if (x_106 == 0) -{ -lean_object* x_107; lean_object* x_108; -x_107 = lean_ctor_get(x_11, 0); -lean_dec(x_107); -x_108 = lean_ctor_get(x_58, 0); -lean_inc(x_108); -lean_dec(x_58); -lean_ctor_set_tag(x_11, 1); -lean_ctor_set(x_11, 0, x_108); -return x_11; -} -else -{ -lean_object* x_109; lean_object* x_110; lean_object* x_111; -x_109 = lean_ctor_get(x_11, 1); -lean_inc(x_109); -lean_dec(x_11); -x_110 = lean_ctor_get(x_58, 0); -lean_inc(x_110); -lean_dec(x_58); -x_111 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_111, 0, x_110); -lean_ctor_set(x_111, 1, x_109); -return x_111; -} -} -} -} -} -else -{ -uint8_t x_112; -lean_dec(x_8); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_112 = !lean_is_exclusive(x_11); -if (x_112 == 0) -{ -return x_11; -} -else -{ -lean_object* x_113; lean_object* x_114; lean_object* x_115; -x_113 = lean_ctor_get(x_11, 0); -x_114 = lean_ctor_get(x_11, 1); -lean_inc(x_114); +x_113 = lean_ctor_get(x_60, 0); lean_inc(x_113); -lean_dec(x_11); -x_115 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_115, 0, x_113); -lean_ctor_set(x_115, 1, x_114); -return x_115; +lean_dec(x_60); +x_114 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_114, 0, x_113); +lean_ctor_set(x_114, 1, x_112); +return x_114; +} +} +} +} +} +else +{ +uint8_t x_115; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_115 = !lean_is_exclusive(x_12); +if (x_115 == 0) +{ +return x_12; +} +else +{ +lean_object* x_116; lean_object* x_117; lean_object* x_118; +x_116 = lean_ctor_get(x_12, 0); +x_117 = lean_ctor_get(x_12, 1); +lean_inc(x_117); +lean_inc(x_116); +lean_dec(x_12); +x_118 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_118, 0, x_116); +lean_ctor_set(x_118, 1, x_117); +return x_118; } } } @@ -6895,7 +7353,7 @@ lean_object* l_Lean_Server_FileWorker_updateDocument(lean_object* x_1, lean_obje _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_5 = lean_ctor_get(x_3, 3); +x_5 = lean_ctor_get(x_3, 4); lean_inc(x_5); x_6 = lean_st_ref_get(x_5, x_4); x_7 = lean_ctor_get(x_6, 0); @@ -6965,8 +7423,10 @@ else { lean_object* x_25; lean_object* x_26; x_25 = lean_box(0); -x_26 = l_Lean_Server_FileWorker_updateDocument___lambda__3(x_7, x_2, x_10, x_1, x_14, x_5, x_25, x_3, x_15); +lean_inc(x_3); +x_26 = l_Lean_Server_FileWorker_updateDocument___lambda__3(x_7, x_2, x_10, x_3, x_1, x_14, x_5, x_25, x_3, x_15); lean_dec(x_5); +lean_dec(x_3); return x_26; } } @@ -7021,45 +7481,27 @@ x_4 = lean_box(x_3); return x_4; } } -lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; -x_9 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_3); -return x_9; -} -} -lean_object* l_Lean_Server_FileWorker_updateDocument___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, lean_object* x_8, lean_object* x_9) { +lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; -x_10 = l_Lean_Server_FileWorker_updateDocument___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +x_10 = l_Lean_Server_FileWorker_updateDocument___lambda__2(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_4); return x_10; } } -lean_object* l_Lean_Server_FileWorker_handleDidOpen(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_FileWorker_updateDocument___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, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_1, 2); -lean_inc(x_5); -x_6 = lean_ctor_get(x_1, 3); -lean_inc(x_6); -lean_dec(x_1); -x_7 = l_Lean_FileMap_ofString(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_Lean_Server_FileWorker_compileDocument(x_8, x_2, x_3); -return x_9; +lean_object* x_11; +x_11 = l_Lean_Server_FileWorker_updateDocument___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +return x_11; } } lean_object* l_Lean_Server_FileWorker_handleDidChange_match__1___rarg(lean_object* x_1, lean_object* x_2) { @@ -7138,7 +7580,7 @@ lean_inc(x_4); x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); lean_dec(x_1); -x_6 = lean_ctor_get(x_2, 3); +x_6 = lean_ctor_get(x_2, 4); lean_inc(x_6); x_7 = lean_st_ref_get(x_6, x_3); lean_dec(x_6); @@ -7667,325 +8109,7 @@ x_3 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_mapTask___rarg), 4, 0) return x_3; } } -lean_object* l_Lean_Server_FileWorker_handleHover_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_5; -lean_dec(x_3); -x_5 = lean_apply_2(x_4, x_1, x_2); -return x_5; -} -else -{ -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_6; -lean_dec(x_3); -x_6 = lean_apply_2(x_4, x_1, x_2); -return x_6; -} -else -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_4); -x_7 = lean_ctor_get(x_1, 0); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_ctor_get(x_2, 0); -lean_inc(x_8); -lean_dec(x_2); -x_9 = lean_apply_2(x_3, x_7, x_8); -return x_9; -} -} -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__1___rarg), 4, 0); -return x_2; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_1) == 1) -{ -lean_object* x_4; lean_object* x_5; -lean_dec(x_3); -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_apply_1(x_2, x_4); -return x_5; -} -else -{ -lean_object* x_6; -lean_dec(x_2); -x_6 = lean_apply_1(x_3, x_1); -return x_6; -} -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__2___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_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; -x_4 = lean_ctor_get(x_1, 1); -lean_inc(x_4); -if (lean_obj_tag(x_4) == 1) -{ -lean_object* x_5; -x_5 = lean_ctor_get(x_4, 0); -lean_inc(x_5); -if (lean_obj_tag(x_5) == 1) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_3); -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_ctor_get(x_4, 1); -lean_inc(x_7); -lean_dec(x_4); -x_8 = lean_ctor_get(x_5, 0); -lean_inc(x_8); -lean_dec(x_5); -x_9 = lean_apply_3(x_2, x_6, x_8, x_7); -return x_9; -} -else -{ -lean_object* x_10; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_10 = lean_apply_1(x_3, x_1); -return x_10; -} -} -else -{ -lean_object* x_11; -lean_dec(x_4); -lean_dec(x_2); -x_11 = lean_apply_1(x_3, x_1); -return x_11; -} -} -else -{ -lean_object* x_12; -lean_dec(x_2); -x_12 = lean_apply_1(x_3, x_1); -return x_12; -} -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__3(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__3___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_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_dec(x_2); -x_4 = lean_apply_1(x_3, x_1); -return x_4; -} -else -{ -lean_object* x_5; lean_object* x_6; -lean_dec(x_3); -x_5 = lean_ctor_get(x_1, 0); -lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_apply_1(x_2, x_5); -return x_6; -} -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__4(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__4___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__5___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_1) == 4) -{ -lean_object* x_4; lean_object* x_5; uint64_t x_6; lean_object* x_7; lean_object* x_8; -lean_dec(x_3); -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_1, 1); -lean_inc(x_5); -x_6 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); -lean_dec(x_1); -x_7 = lean_box_uint64(x_6); -x_8 = lean_apply_3(x_2, x_4, x_5, x_7); -return x_8; -} -else -{ -lean_object* x_9; -lean_dec(x_2); -x_9 = lean_apply_1(x_3, x_1); -return x_9; -} -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__5(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__5___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__6___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_dec(x_2); -x_4 = lean_apply_1(x_3, x_1); -return x_4; -} -else -{ -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_dec(x_3); -x_5 = lean_ctor_get(x_1, 0); -lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -x_7 = lean_ctor_get(x_5, 0); -lean_inc(x_7); -lean_dec(x_5); -x_8 = lean_ctor_get(x_6, 0); -lean_inc(x_8); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_dec(x_6); -x_10 = lean_apply_3(x_2, x_7, x_8, x_9); -return x_10; -} -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__6(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__6___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__7___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = lean_ctor_get(x_1, 0); -lean_inc(x_3); -lean_dec(x_1); -x_4 = lean_apply_1(x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__7(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__7___rarg), 2, 0); -return x_2; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__8___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_3); -x_4 = lean_box(0); -x_5 = lean_apply_1(x_2, x_4); -return x_5; -} -else -{ -lean_object* x_6; lean_object* x_7; -lean_dec(x_2); -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_apply_1(x_3, x_6); -return x_7; -} -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__8(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__8___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__9___rarg(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = lean_box(0); -x_3 = lean_apply_1(x_1, x_2); -return x_3; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__9(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__9___rarg), 1, 0); -return x_3; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__9___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_Server_FileWorker_handleHover_match__9(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_Lean_Server_FileWorker_handleHover_match__10___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { if (lean_obj_tag(x_1) == 0) @@ -8040,33 +8164,33 @@ lean_dec(x_1); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; -lean_dec(x_5); +lean_dec(x_6); x_15 = lean_box(0); -x_16 = lean_apply_1(x_6, x_15); +x_16 = lean_apply_1(x_5, x_15); return x_16; } else { lean_object* x_17; lean_object* x_18; -lean_dec(x_6); +lean_dec(x_5); x_17 = lean_ctor_get(x_14, 0); lean_inc(x_17); lean_dec(x_14); -x_18 = lean_apply_1(x_5, x_17); +x_18 = lean_apply_1(x_6, x_17); return x_18; } } } } -lean_object* l_Lean_Server_FileWorker_handleHover_match__10(lean_object* x_1) { +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap_match__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__10___rarg), 6, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_withWaitFindSnap_match__1___rarg), 6, 0); return x_2; } } -lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_handleHover___spec__2(lean_object* x_1) { +lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_withWaitFindSnap___spec__2(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; @@ -8076,7 +8200,7 @@ x_4 = lean_task_map(x_2, x_1, x_3); return x_4; } } -lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_handleHover___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_2) == 0) @@ -8118,7 +8242,7 @@ lean_object* x_13; lean_object* x_14; x_13 = lean_ctor_get(x_2, 0); lean_inc(x_13); lean_dec(x_2); -x_14 = l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_handleHover___spec__1(x_1, x_13, x_3); +x_14 = l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1(x_1, x_13, x_3); if (lean_obj_tag(x_14) == 0) { uint8_t x_15; @@ -8175,7 +8299,7 @@ return x_29; } } } -lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_handleHover___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { switch (lean_obj_tag(x_2)) { @@ -8187,8 +8311,10 @@ lean_inc(x_4); x_5 = lean_ctor_get(x_2, 1); lean_inc(x_5); lean_dec(x_2); -x_6 = l_Lean_Server_Snapshots_Snapshot_endPos(x_4); -x_7 = lean_nat_dec_lt(x_1, x_6); +lean_inc(x_1); +lean_inc(x_4); +x_6 = lean_apply_1(x_1, x_4); +x_7 = lean_unbox(x_6); lean_dec(x_6); if (x_7 == 0) { @@ -8218,7 +8344,7 @@ lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_13 = lean_ctor_get(x_2, 0); lean_inc(x_13); lean_dec(x_2); -x_14 = lean_alloc_closure((void*)(l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_handleHover___spec__1___lambda__1), 3, 1); +x_14 = lean_alloc_closure((void*)(l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1___lambda__1), 3, 1); lean_closure_set(x_14, 0, x_1); x_15 = l_Task_Priority_default; x_16 = lean_io_bind_task(x_13, x_14, x_15, x_3); @@ -8287,374 +8413,332 @@ return x_31; } } } -uint8_t l_Array_anyMUnsafe_any___at_Lean_Server_FileWorker_handleHover___spec__4(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4) { +static lean_object* _init_l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1() { _start: { -uint8_t x_5; -x_5 = x_3 == x_4; -if (x_5 == 0) -{ -lean_object* x_6; uint8_t x_7; -x_6 = lean_array_uget(x_2, x_3); -x_7 = lean_name_eq(x_1, x_6); -lean_dec(x_6); -if (x_7 == 0) -{ -size_t x_8; size_t x_9; -x_8 = 1; -x_9 = x_3 + x_8; -x_3 = x_9; -goto _start; -} -else -{ -uint8_t x_11; -x_11 = 1; -return x_11; +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Server_FileWorker_RequestError_fileChanged; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; } } -else -{ -uint8_t x_12; -x_12 = 0; -return x_12; -} -} -} -uint8_t l_Array_contains___at_Lean_Server_FileWorker_handleHover___spec__3(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -lean_object* x_3; lean_object* x_4; uint8_t x_5; -x_3 = lean_array_get_size(x_1); -x_4 = lean_unsigned_to_nat(0u); -x_5 = lean_nat_dec_lt(x_4, x_3); -if (x_5 == 0) +if (lean_obj_tag(x_3) == 0) { -uint8_t x_6; +lean_object* x_6; +lean_dec(x_2); +x_6 = lean_ctor_get(x_3, 0); +lean_inc(x_6); lean_dec(x_3); -x_6 = 0; -return x_6; -} -else +switch (lean_obj_tag(x_6)) { +case 0: { -uint8_t x_7; -x_7 = lean_nat_dec_le(x_3, x_3); -if (x_7 == 0) -{ -uint8_t x_8; -lean_dec(x_3); -x_8 = 0; +lean_object* x_7; lean_object* x_8; +lean_dec(x_4); +lean_dec(x_1); +x_7 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1; +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_7); +lean_ctor_set(x_8, 1, x_5); return x_8; } -else -{ -size_t x_9; size_t x_10; uint8_t x_11; -x_9 = 0; -x_10 = lean_usize_of_nat(x_3); -lean_dec(x_3); -x_11 = l_Array_anyMUnsafe_any___at_Lean_Server_FileWorker_handleHover___spec__4(x_2, x_1, x_9, x_10); -return x_11; -} -} -} -} -lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleHover___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_5; lean_object* x_6; -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_2); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_5); -lean_ctor_set(x_6, 1, x_4); -return x_6; -} -else -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_7 = lean_ctor_get(x_1, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_1, 1); -lean_inc(x_8); -lean_dec(x_1); -if (lean_obj_tag(x_7) == 0) -{ -lean_object* x_15; -x_15 = lean_ctor_get(x_7, 1); -lean_inc(x_15); -if (lean_obj_tag(x_15) == 1) -{ -lean_object* x_16; -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -lean_dec(x_15); -if (lean_obj_tag(x_16) == 1) -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_17 = lean_ctor_get(x_7, 0); -lean_inc(x_17); -lean_dec(x_7); -x_18 = lean_ctor_get(x_16, 0); -lean_inc(x_18); -lean_dec(x_16); -lean_inc(x_18); -x_19 = l_Lean_Elab_TermInfo_tailPos_x3f(x_18); -x_20 = l_Lean_Elab_TermInfo_pos_x3f(x_18); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = l_instInhabitedNat; -x_23 = l_Option_get_x21___rarg___closed__4; -x_24 = lean_panic_fn(x_22, x_23); -if (lean_obj_tag(x_20) == 0) -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_25 = lean_panic_fn(x_22, x_23); -x_26 = lean_nat_sub(x_24, x_25); -lean_dec(x_25); -lean_dec(x_24); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_21); -x_28 = lean_array_push(x_2, x_27); -x_29 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_29, 0, x_28); -x_30 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_30, 0, x_29); -x_9 = x_30; -x_10 = x_4; -goto block_14; -} -else -{ -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_31 = lean_ctor_get(x_20, 0); -lean_inc(x_31); -lean_dec(x_20); -x_32 = lean_nat_sub(x_24, x_31); -lean_dec(x_31); -lean_dec(x_24); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_21); -x_34 = lean_array_push(x_2, x_33); -x_35 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_35, 0, x_34); -x_36 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_36, 0, x_35); -x_9 = x_36; -x_10 = x_4; -goto block_14; -} -} -else -{ -if (lean_obj_tag(x_20) == 0) -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_37 = lean_ctor_get(x_19, 0); -lean_inc(x_37); -lean_dec(x_19); -x_38 = l_instInhabitedNat; -x_39 = l_Option_get_x21___rarg___closed__4; -x_40 = lean_panic_fn(x_38, x_39); -x_41 = lean_nat_sub(x_37, x_40); -lean_dec(x_40); -lean_dec(x_37); -x_42 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_42, 0, x_41); -lean_ctor_set(x_42, 1, x_21); -x_43 = lean_array_push(x_2, x_42); -x_44 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_44, 0, x_43); -x_45 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_45, 0, x_44); -x_9 = x_45; -x_10 = x_4; -goto block_14; -} -else -{ -lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_46 = lean_ctor_get(x_19, 0); -lean_inc(x_46); -lean_dec(x_19); -x_47 = lean_ctor_get(x_20, 0); -lean_inc(x_47); -lean_dec(x_20); -x_48 = lean_nat_sub(x_46, x_47); -lean_dec(x_47); -lean_dec(x_46); -x_49 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_21); -x_50 = lean_array_push(x_2, x_49); -x_51 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_51, 0, x_50); -x_52 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_52, 0, x_51); -x_9 = x_52; -x_10 = x_4; -goto block_14; -} -} -} -else -{ -lean_object* x_53; lean_object* x_54; -lean_dec(x_16); -lean_dec(x_7); -x_53 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_53, 0, x_2); -x_54 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_54, 0, x_53); -x_9 = x_54; -x_10 = x_4; -goto block_14; -} -} -else -{ -lean_object* x_55; lean_object* x_56; -lean_dec(x_15); -lean_dec(x_7); -x_55 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_55, 0, x_2); -x_56 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_56, 0, x_55); -x_9 = x_56; -x_10 = x_4; -goto block_14; -} -} -else -{ -lean_object* x_57; lean_object* x_58; -lean_dec(x_7); -x_57 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_57, 0, x_2); -x_58 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_58, 0, x_57); -x_9 = x_58; -x_10 = x_4; -goto block_14; -} -block_14: -{ -lean_object* x_11; lean_object* x_12; -x_11 = lean_ctor_get(x_9, 0); -lean_inc(x_11); -lean_dec(x_9); -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -lean_dec(x_11); -x_1 = x_8; -x_2 = x_12; -x_4 = x_10; -goto _start; -} -} -} -} -lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleHover___spec__7(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; -x_5 = x_2 == x_3; -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; size_t x_10; size_t x_11; -x_6 = lean_array_uget(x_1, x_2); -x_7 = lean_ctor_get(x_6, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_4, 0); -lean_inc(x_8); -x_9 = lean_nat_dec_lt(x_7, x_8); -lean_dec(x_8); -lean_dec(x_7); -x_10 = 1; -x_11 = x_2 + x_10; -if (x_9 == 0) -{ -lean_dec(x_6); -x_2 = x_11; -goto _start; -} -else -{ -lean_dec(x_4); -x_2 = x_11; -x_4 = x_6; -goto _start; -} -} -else -{ -return x_4; -} -} -} -lean_object* l_Array_getMax_x3f___at_Lean_Server_FileWorker_handleHover___spec__6(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; uint8_t x_4; -x_2 = lean_array_get_size(x_1); -x_3 = lean_unsigned_to_nat(0u); -x_4 = lean_nat_dec_lt(x_3, x_2); -if (x_4 == 0) -{ -lean_object* x_5; -lean_dec(x_2); -x_5 = lean_box(0); -return x_5; -} -else -{ -lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_6 = lean_array_fget(x_1, x_3); -x_7 = lean_unsigned_to_nat(1u); -x_8 = lean_nat_dec_lt(x_7, x_2); -if (x_8 == 0) +case 1: { lean_object* x_9; -lean_dec(x_2); -x_9 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_9, 0, x_6); +x_9 = lean_apply_2(x_1, x_4, x_5); return x_9; } -else +default: { -uint8_t x_10; -x_10 = lean_nat_dec_le(x_2, x_2); -if (x_10 == 0) -{ -lean_object* x_11; -lean_dec(x_2); -x_11 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_11, 0, x_6); +lean_object* x_10; lean_object* x_11; +lean_dec(x_4); +lean_dec(x_1); +x_10 = lean_ctor_get(x_6, 0); +lean_inc(x_10); +lean_dec(x_6); +x_11 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_5); return x_11; } +} +} else { -size_t x_12; size_t x_13; lean_object* x_14; lean_object* x_15; -x_12 = 1; -x_13 = lean_usize_of_nat(x_2); +lean_object* x_12; +x_12 = lean_ctor_get(x_3, 0); +lean_inc(x_12); +lean_dec(x_3); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_dec(x_2); -x_14 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleHover___spec__7(x_1, x_12, x_13, x_6); -x_15 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_15, 0, x_14); +x_13 = lean_apply_2(x_1, x_4, x_5); +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; +lean_dec(x_1); +x_14 = lean_ctor_get(x_12, 0); +lean_inc(x_14); +lean_dec(x_12); +x_15 = lean_apply_3(x_2, x_14, x_4, x_5); return x_15; } } } } +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_1, 2); +lean_inc(x_7); +lean_dec(x_1); +x_8 = l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1(x_2, x_7, x_6); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +x_11 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1), 5, 2); +lean_closure_set(x_11, 0, x_3); +lean_closure_set(x_11, 1, x_4); +x_12 = l_Lean_Server_FileWorker_mapTask___rarg(x_9, x_11, x_5, x_10); +return x_12; } -lean_object* l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +else +{ +uint8_t x_13; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_13 = !lean_is_exclusive(x_8); +if (x_13 == 0) +{ +return x_8; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_8, 0); +x_15 = lean_ctor_get(x_8, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_8); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +} +} +lean_object* l_Lean_Server_FileWorker_withWaitFindSnap(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_withWaitFindSnap___rarg), 6, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_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_dec(x_2); +x_4 = lean_apply_1(x_3, x_1); +return x_4; +} +else +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_3); +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_1(x_2, x_5); +return x_6; +} +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__1___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_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_dec(x_2); +x_4 = lean_apply_1(x_3, x_1); +return x_4; +} +else +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_3); +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_1(x_2, x_5); +return x_6; +} +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__2___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_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_dec(x_2); +x_4 = lean_apply_1(x_3, x_1); +return x_4; +} +else +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +lean_dec(x_3); +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_apply_2(x_2, x_6, x_7); +return x_8; +} +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__3___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__4___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +x_4 = lean_apply_1(x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__4___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__5___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_3); +x_4 = lean_box(0); +x_5 = lean_apply_1(x_2, x_4); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_2); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_1(x_3, x_6); +return x_7; +} +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__5(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__5___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__6___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = lean_box(0); +x_3 = lean_apply_1(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__6(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__6___rarg), 1, 0); +return x_3; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover_match__6___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Server_FileWorker_handleHover_match__6(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_3); +return x_4; +} +} +lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; @@ -8694,7 +8778,7 @@ return x_18; } } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__11(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, size_t x_7, size_t x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, size_t x_7, size_t x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; uint8_t x_36; @@ -8725,7 +8809,7 @@ x_42 = lean_ctor_get(x_9, 0); lean_dec(x_42); lean_inc(x_3); lean_inc(x_2); -x_43 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__10(x_1, x_2, x_3, x_4, x_39, x_41, x_10, x_11); +x_43 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__4(x_1, x_2, x_3, x_4, x_39, x_41, x_10, x_11); lean_dec(x_39); if (lean_obj_tag(x_43) == 0) { @@ -8917,7 +9001,7 @@ lean_inc(x_75); lean_dec(x_9); lean_inc(x_3); lean_inc(x_2); -x_76 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__10(x_1, x_2, x_3, x_4, x_39, x_75, x_10, x_11); +x_76 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__4(x_1, x_2, x_3, x_4, x_39, x_75, x_10, x_11); lean_dec(x_39); if (lean_obj_tag(x_76) == 0) { @@ -9161,183 +9245,7 @@ goto _start; } } } -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_MonadEnv_0__Lean_supportedRecursors___closed__14; -x_2 = l_Lean_identKind; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__1; -x_2 = l_Lean_strLitKind; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__2; -x_2 = l_Lean_charLitKind; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__3; -x_2 = l_Lean_numLitKind; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__4; -x_2 = l_Lean_scientificLitKind; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__5; -x_2 = l_Lean_nameLitKind; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__7() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__6; -x_2 = l_Lean_fieldIdxKind; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__8() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__7; -x_2 = l_Lean_interpolatedStrLitKind; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__9() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__8; -x_2 = l_Lean_interpolatedStrKind; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -uint8_t l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 1) -{ -lean_object* x_3; lean_object* x_4; -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = l_Lean_Elab_TermInfo_pos_x3f(x_3); -if (lean_obj_tag(x_4) == 0) -{ -uint8_t x_5; -lean_dec(x_3); -x_5 = 0; -return x_5; -} -else -{ -lean_object* x_6; lean_object* x_7; -x_6 = lean_ctor_get(x_4, 0); -lean_inc(x_6); -lean_dec(x_4); -lean_inc(x_3); -x_7 = l_Lean_Elab_TermInfo_tailPos_x3f(x_3); -if (lean_obj_tag(x_7) == 0) -{ -uint8_t x_8; -lean_dec(x_6); -lean_dec(x_3); -x_8 = 0; -return x_8; -} -else -{ -lean_object* x_9; uint8_t x_10; -x_9 = lean_ctor_get(x_7, 0); -lean_inc(x_9); -lean_dec(x_7); -x_10 = lean_nat_dec_le(x_6, x_1); -lean_dec(x_6); -if (x_10 == 0) -{ -uint8_t x_11; -lean_dec(x_9); -lean_dec(x_3); -x_11 = 0; -return x_11; -} -else -{ -uint8_t x_12; -x_12 = lean_nat_dec_lt(x_1, x_9); -lean_dec(x_9); -if (x_12 == 0) -{ -uint8_t x_13; -lean_dec(x_3); -x_13 = 0; -return x_13; -} -else -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; -x_14 = lean_ctor_get(x_3, 2); -lean_inc(x_14); -lean_dec(x_3); -x_15 = l_Lean_Syntax_getKind(x_14); -x_16 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__9; -x_17 = l_Array_contains___at_Lean_Server_FileWorker_handleHover___spec__3(x_16, x_15); -lean_dec(x_15); -return x_17; -} -} -} -} -} -else -{ -uint8_t x_18; -lean_dec(x_2); -x_18 = 0; -return x_18; -} -} -} -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; @@ -9351,7 +9259,7 @@ lean_ctor_set(x_7, 1, x_4); return x_7; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; @@ -9479,7 +9387,7 @@ return x_36; } } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___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) { _start: { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; @@ -9614,7 +9522,7 @@ return x_52; } } } -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__1() { +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__1() { _start: { lean_object* x_1; @@ -9622,17 +9530,17 @@ x_1 = lean_mk_string("```lean\n"); return x_1; } } -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__2() { +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__1; +x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__3() { +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__3() { _start: { lean_object* x_1; @@ -9640,17 +9548,17 @@ x_1 = lean_mk_string("\n```"); return x_1; } } -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__4() { +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__4() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__3; +x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__3; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__5() { +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__5() { _start: { lean_object* x_1; @@ -9658,532 +9566,438 @@ x_1 = lean_mk_string("\n***\n"); return x_1; } } -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__6() { +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__6() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__5; +x_1 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__5; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_11; lean_object* x_12; lean_object* x_35; uint8_t x_73; -x_73 = x_7 < x_6; -if (x_73 == 0) +lean_object* x_11; lean_object* x_12; lean_object* x_30; lean_object* x_31; uint8_t x_56; +x_56 = x_7 < x_6; +if (x_56 == 0) { -lean_object* x_74; lean_object* x_75; +lean_object* x_57; lean_object* x_58; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_74 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_74, 0, x_8); -x_75 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_75, 0, x_74); -lean_ctor_set(x_75, 1, x_10); -return x_75; +x_57 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_57, 0, x_8); +x_58 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_10); +return x_58; } else { -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_59; lean_object* x_60; lean_dec(x_8); -x_76 = lean_array_uget(x_5, x_7); +x_59 = lean_array_uget(x_5, x_7); lean_inc(x_2); -x_77 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___boxed), 2, 1); -lean_closure_set(x_77, 0, x_2); -x_78 = l_Lean_Elab_InfoTree_smallestNodes(x_77, x_76); -x_79 = l_Array_empty___closed__1; -x_80 = l_List_forIn_loop___at_Lean_Server_FileWorker_handleHover___spec__5(x_78, x_79, x_9, x_10); -x_81 = lean_ctor_get(x_80, 0); -lean_inc(x_81); -x_82 = lean_ctor_get(x_80, 1); -lean_inc(x_82); -lean_dec(x_80); -x_83 = lean_ctor_get(x_81, 0); -lean_inc(x_83); -lean_dec(x_81); -x_84 = l_Array_getMax_x3f___at_Lean_Server_FileWorker_handleHover___spec__6(x_83); -lean_dec(x_83); -if (lean_obj_tag(x_84) == 0) +x_60 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f(x_59, x_2); +if (lean_obj_tag(x_60) == 0) { -lean_object* x_85; lean_object* x_86; -x_85 = lean_box(0); +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_61 = lean_box(0); lean_inc(x_3); -x_86 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2(x_3, x_85, x_9, x_82); -x_35 = x_86; -goto block_72; +x_62 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_3, x_61, x_9, x_10); +x_63 = lean_ctor_get(x_62, 0); +lean_inc(x_63); +x_64 = lean_ctor_get(x_62, 1); +lean_inc(x_64); +lean_dec(x_62); +x_30 = x_63; +x_31 = x_64; +goto block_55; } else { -lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_87 = lean_ctor_get(x_84, 0); -lean_inc(x_87); -lean_dec(x_84); -x_88 = lean_ctor_get(x_87, 1); +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_65 = lean_ctor_get(x_60, 0); +lean_inc(x_65); +lean_dec(x_60); +x_66 = lean_ctor_get(x_65, 0); +lean_inc(x_66); +x_67 = lean_ctor_get(x_65, 1); +lean_inc(x_67); +lean_dec(x_65); +x_68 = lean_ctor_get(x_67, 0); +lean_inc(x_68); +x_69 = lean_ctor_get(x_67, 1); +lean_inc(x_69); +lean_inc(x_69); +x_70 = lean_alloc_closure((void*)(l_Lean_Meta_ppExpr___boxed), 6, 1); +lean_closure_set(x_70, 0, x_69); +lean_inc(x_69); +x_71 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__2), 7, 1); +lean_closure_set(x_71, 0, x_69); +x_72 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); +lean_closure_set(x_72, 0, x_70); +lean_closure_set(x_72, 1, x_71); +lean_inc(x_68); +x_73 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_66, x_68, x_72, x_10); +if (lean_obj_tag(x_73) == 0) +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_74 = lean_ctor_get(x_73, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_73, 1); +lean_inc(x_75); +lean_dec(x_73); +x_76 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__2; +x_77 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_74); +x_78 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__4; +x_79 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +x_80 = l_Lean_Expr_constName_x3f(x_69); +lean_dec(x_69); +if (lean_obj_tag(x_80) == 0) +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; +lean_dec(x_68); +lean_dec(x_66); +x_81 = lean_box(0); +x_82 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__3(x_67, x_1, x_79, x_81, x_9, x_75); +x_83 = lean_ctor_get(x_82, 0); +lean_inc(x_83); +x_84 = lean_ctor_get(x_82, 1); +lean_inc(x_84); +lean_dec(x_82); +x_30 = x_83; +x_31 = x_84; +goto block_55; +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_80, 0); +lean_inc(x_85); +lean_dec(x_80); +x_86 = lean_alloc_closure((void*)(l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__2___boxed), 6, 1); +lean_closure_set(x_86, 0, x_85); +x_87 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_66, x_68, x_86, x_75); +lean_dec(x_66); +if (lean_obj_tag(x_87) == 0) +{ +lean_object* x_88; +x_88 = lean_ctor_get(x_87, 0); lean_inc(x_88); -lean_dec(x_87); -x_89 = lean_ctor_get(x_88, 0); +if (lean_obj_tag(x_88) == 0) +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_89 = lean_ctor_get(x_87, 1); lean_inc(x_89); -x_90 = lean_ctor_get(x_88, 1); -lean_inc(x_90); +lean_dec(x_87); +x_90 = lean_box(0); +x_91 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__3(x_67, x_1, x_79, x_90, x_9, x_89); +x_92 = lean_ctor_get(x_91, 0); +lean_inc(x_92); +x_93 = lean_ctor_get(x_91, 1); +lean_inc(x_93); +lean_dec(x_91); +x_30 = x_92; +x_31 = x_93; +goto block_55; +} +else +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; +x_94 = lean_ctor_get(x_87, 1); +lean_inc(x_94); +lean_dec(x_87); +x_95 = lean_ctor_get(x_88, 0); +lean_inc(x_95); lean_dec(x_88); -x_91 = lean_ctor_get(x_90, 0); -lean_inc(x_91); -x_92 = lean_ctor_get(x_90, 1); -lean_inc(x_92); -lean_inc(x_92); -x_93 = lean_alloc_closure((void*)(l_Lean_Meta_ppExpr___boxed), 6, 1); -lean_closure_set(x_93, 0, x_92); -lean_inc(x_92); -x_94 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__3), 7, 1); -lean_closure_set(x_94, 0, x_92); -x_95 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); -lean_closure_set(x_95, 0, x_93); -lean_closure_set(x_95, 1, x_94); -lean_inc(x_91); -x_96 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_89, x_91, x_95, x_82); -if (lean_obj_tag(x_96) == 0) -{ -lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; -x_97 = lean_ctor_get(x_96, 0); -lean_inc(x_97); -x_98 = lean_ctor_get(x_96, 1); -lean_inc(x_98); -lean_dec(x_96); -x_99 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__2; -x_100 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_100, 0, x_99); -lean_ctor_set(x_100, 1, x_97); -x_101 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__4; +x_96 = l_Std_Format_join___closed__1; +x_97 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_97, 0, x_96); +lean_ctor_set(x_97, 1, x_79); +x_98 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__6; +x_99 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_99, 0, x_97); +lean_ctor_set(x_99, 1, x_98); +x_100 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_100, 0, x_95); +x_101 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_101, 0, x_99); +lean_ctor_set(x_101, 1, x_100); x_102 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_102, 0, x_100); -lean_ctor_set(x_102, 1, x_101); -if (lean_obj_tag(x_92) == 4) -{ -lean_object* x_103; lean_object* x_104; lean_object* x_105; -x_103 = lean_ctor_get(x_92, 0); -lean_inc(x_103); -lean_dec(x_92); -x_104 = lean_alloc_closure((void*)(l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__8___boxed), 6, 1); -lean_closure_set(x_104, 0, x_103); -x_105 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_89, x_91, x_104, x_98); -lean_dec(x_89); -if (lean_obj_tag(x_105) == 0) -{ -lean_object* x_106; -x_106 = lean_ctor_get(x_105, 0); +lean_ctor_set(x_102, 0, x_101); +lean_ctor_set(x_102, 1, x_96); +x_103 = lean_box(0); +x_104 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__3(x_67, x_1, x_102, x_103, x_9, x_94); +x_105 = lean_ctor_get(x_104, 0); +lean_inc(x_105); +x_106 = lean_ctor_get(x_104, 1); lean_inc(x_106); -if (lean_obj_tag(x_106) == 0) -{ -lean_object* x_107; lean_object* x_108; lean_object* x_109; -x_107 = lean_ctor_get(x_105, 1); -lean_inc(x_107); -lean_dec(x_105); -x_108 = lean_box(0); -x_109 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4(x_90, x_1, x_102, x_108, x_9, x_107); -x_35 = x_109; -goto block_72; -} -else -{ -lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; -x_110 = lean_ctor_get(x_105, 1); -lean_inc(x_110); -lean_dec(x_105); -x_111 = lean_ctor_get(x_106, 0); -lean_inc(x_111); -lean_dec(x_106); -x_112 = l_Std_Format_join___closed__1; -x_113 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_113, 0, x_112); -lean_ctor_set(x_113, 1, x_102); -x_114 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__6; -x_115 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_115, 0, x_113); -lean_ctor_set(x_115, 1, x_114); -x_116 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_116, 0, x_111); -x_117 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_117, 0, x_115); -lean_ctor_set(x_117, 1, x_116); -x_118 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_118, 0, x_117); -lean_ctor_set(x_118, 1, x_112); -x_119 = lean_box(0); -x_120 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4(x_90, x_1, x_118, x_119, x_9, x_110); -x_35 = x_120; -goto block_72; +lean_dec(x_104); +x_30 = x_105; +x_31 = x_106; +goto block_55; } } else { -uint8_t x_121; -lean_dec(x_102); -lean_dec(x_90); -x_121 = !lean_is_exclusive(x_105); -if (x_121 == 0) +uint8_t x_107; +lean_dec(x_79); +lean_dec(x_67); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_107 = !lean_is_exclusive(x_87); +if (x_107 == 0) { -x_35 = x_105; -goto block_72; +return x_87; } else { -lean_object* x_122; lean_object* x_123; lean_object* x_124; -x_122 = lean_ctor_get(x_105, 0); -x_123 = lean_ctor_get(x_105, 1); -lean_inc(x_123); -lean_inc(x_122); -lean_dec(x_105); -x_124 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_124, 0, x_122); -lean_ctor_set(x_124, 1, x_123); -x_35 = x_124; -goto block_72; +lean_object* x_108; lean_object* x_109; lean_object* x_110; +x_108 = lean_ctor_get(x_87, 0); +x_109 = lean_ctor_get(x_87, 1); +lean_inc(x_109); +lean_inc(x_108); +lean_dec(x_87); +x_110 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_110, 0, x_108); +lean_ctor_set(x_110, 1, x_109); +return x_110; +} } } } else { -lean_object* x_125; lean_object* x_126; -lean_dec(x_92); -lean_dec(x_91); -lean_dec(x_89); -x_125 = lean_box(0); -x_126 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4(x_90, x_1, x_102, x_125, x_9, x_98); -x_35 = x_126; -goto block_72; -} +uint8_t x_111; +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_67); +lean_dec(x_66); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_111 = !lean_is_exclusive(x_73); +if (x_111 == 0) +{ +return x_73; } else { -uint8_t x_127; -lean_dec(x_92); -lean_dec(x_91); -lean_dec(x_90); -lean_dec(x_89); -x_127 = !lean_is_exclusive(x_96); -if (x_127 == 0) -{ -x_35 = x_96; -goto block_72; -} -else -{ -lean_object* x_128; lean_object* x_129; lean_object* x_130; -x_128 = lean_ctor_get(x_96, 0); -x_129 = lean_ctor_get(x_96, 1); -lean_inc(x_129); -lean_inc(x_128); -lean_dec(x_96); -x_130 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_130, 0, x_128); -lean_ctor_set(x_130, 1, x_129); -x_35 = x_130; -goto block_72; +lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_112 = lean_ctor_get(x_73, 0); +x_113 = lean_ctor_get(x_73, 1); +lean_inc(x_113); +lean_inc(x_112); +lean_dec(x_73); +x_114 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_114, 0, x_112); +lean_ctor_set(x_114, 1, x_113); +return x_114; } } } } -block_34: -{ -if (lean_obj_tag(x_11) == 0) +block_29: { uint8_t x_13; -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_11); -lean_ctor_set(x_14, 1, x_12); -return x_14; -} -else +x_14 = lean_ctor_get(x_11, 0); +if (lean_obj_tag(x_14) == 0) { -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_ctor_get(x_11, 0); +lean_object* x_15; lean_object* x_16; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); -lean_dec(x_11); -x_16 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_16, 0, x_15); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_16); -lean_ctor_set(x_17, 1, x_12); -return x_17; -} +lean_dec(x_14); +lean_ctor_set(x_11, 0, x_15); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_12); +return x_16; } else { -uint8_t x_18; -x_18 = !lean_is_exclusive(x_11); -if (x_18 == 0) -{ -lean_object* x_19; -x_19 = lean_ctor_get(x_11, 0); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -lean_dec(x_19); -lean_ctor_set(x_11, 0, x_20); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_11); -lean_ctor_set(x_21, 1, x_12); -return x_21; -} -else -{ -lean_object* x_22; size_t x_23; size_t x_24; +lean_object* x_17; size_t x_18; size_t x_19; lean_free_object(x_11); -x_22 = lean_ctor_get(x_19, 0); -lean_inc(x_22); -lean_dec(x_19); -x_23 = 1; -x_24 = x_7 + x_23; -x_7 = x_24; -x_8 = x_22; +x_17 = lean_ctor_get(x_14, 0); +lean_inc(x_17); +lean_dec(x_14); +x_18 = 1; +x_19 = x_7 + x_18; +x_7 = x_19; +x_8 = x_17; x_10 = x_12; goto _start; } } else { -lean_object* x_26; -x_26 = lean_ctor_get(x_11, 0); -lean_inc(x_26); +lean_object* x_21; +x_21 = lean_ctor_get(x_11, 0); +lean_inc(x_21); lean_dec(x_11); -if (lean_obj_tag(x_26) == 0) +if (lean_obj_tag(x_21) == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_27 = lean_ctor_get(x_26, 0); -lean_inc(x_27); -lean_dec(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_12); -return x_29; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_23, 0, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_12); +return x_24; } else { -lean_object* x_30; size_t x_31; size_t x_32; -x_30 = lean_ctor_get(x_26, 0); -lean_inc(x_30); -lean_dec(x_26); -x_31 = 1; -x_32 = x_7 + x_31; -x_7 = x_32; -x_8 = x_30; +lean_object* x_25; size_t x_26; size_t x_27; +x_25 = lean_ctor_get(x_21, 0); +lean_inc(x_25); +lean_dec(x_21); +x_26 = 1; +x_27 = x_7 + x_26; +x_7 = x_27; +x_8 = x_25; x_10 = x_12; goto _start; } } } +block_55: +{ +uint8_t x_32; +x_32 = !lean_is_exclusive(x_30); +if (x_32 == 0) +{ +lean_object* x_33; +x_33 = lean_ctor_get(x_30, 0); +if (lean_obj_tag(x_33) == 0) +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +x_35 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_35, 0, x_33); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_34); +x_37 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_30, 0, x_37); +x_11 = x_30; +x_12 = x_31; +goto block_29; } -block_72: +else { -if (lean_obj_tag(x_35) == 0) -{ -lean_object* x_36; -x_36 = lean_ctor_get(x_35, 0); -lean_inc(x_36); -if (lean_obj_tag(x_36) == 0) -{ -lean_object* x_37; uint8_t x_38; -x_37 = lean_ctor_get(x_35, 1); -lean_inc(x_37); -lean_dec(x_35); -x_38 = !lean_is_exclusive(x_36); +uint8_t x_38; +x_38 = !lean_is_exclusive(x_33); if (x_38 == 0) { -x_11 = x_36; -x_12 = x_37; -goto block_34; -} -else -{ lean_object* x_39; lean_object* x_40; -x_39 = lean_ctor_get(x_36, 0); -lean_inc(x_39); -lean_dec(x_36); -x_40 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_40, 0, x_39); -x_11 = x_40; -x_12 = x_37; -goto block_34; +x_39 = lean_ctor_get(x_33, 0); +lean_inc(x_4); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_4); +lean_ctor_set(x_40, 1, x_39); +lean_ctor_set(x_33, 0, x_40); +x_11 = x_30; +x_12 = x_31; +goto block_29; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_33, 0); +lean_inc(x_41); +lean_dec(x_33); +lean_inc(x_4); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_4); +lean_ctor_set(x_42, 1, x_41); +x_43 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_30, 0, x_43); +x_11 = x_30; +x_12 = x_31; +goto block_29; +} } } else { -uint8_t x_41; -x_41 = !lean_is_exclusive(x_36); -if (x_41 == 0) -{ -lean_object* x_42; -x_42 = lean_ctor_get(x_36, 0); -if (lean_obj_tag(x_42) == 0) -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_43 = lean_ctor_get(x_35, 1); -lean_inc(x_43); -lean_dec(x_35); -x_44 = lean_ctor_get(x_42, 0); +lean_object* x_44; +x_44 = lean_ctor_get(x_30, 0); lean_inc(x_44); -x_45 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_45, 0, x_42); -x_46 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_46, 0, x_45); -lean_ctor_set(x_46, 1, x_44); -x_47 = lean_alloc_ctor(0, 1, 0); +lean_dec(x_30); +if (lean_obj_tag(x_44) == 0) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_45 = lean_ctor_get(x_44, 0); +lean_inc(x_45); +x_46 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_46, 0, x_44); +x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); -lean_ctor_set(x_36, 0, x_47); -x_11 = x_36; -x_12 = x_43; -goto block_34; +lean_ctor_set(x_47, 1, x_45); +x_48 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_48, 0, x_47); +x_49 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_49, 0, x_48); +x_11 = x_49; +x_12 = x_31; +goto block_29; } else { -lean_object* x_48; uint8_t x_49; -x_48 = lean_ctor_get(x_35, 1); -lean_inc(x_48); -lean_dec(x_35); -x_49 = !lean_is_exclusive(x_42); -if (x_49 == 0) -{ -lean_object* x_50; lean_object* x_51; -x_50 = lean_ctor_get(x_42, 0); -lean_inc(x_4); -x_51 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_51, 0, x_4); -lean_ctor_set(x_51, 1, x_50); -lean_ctor_set(x_42, 0, x_51); -x_11 = x_36; -x_12 = x_48; -goto block_34; +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_50 = lean_ctor_get(x_44, 0); +lean_inc(x_50); +if (lean_is_exclusive(x_44)) { + lean_ctor_release(x_44, 0); + x_51 = x_44; +} else { + lean_dec_ref(x_44); + x_51 = lean_box(0); } -else -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_52 = lean_ctor_get(x_42, 0); -lean_inc(x_52); -lean_dec(x_42); lean_inc(x_4); -x_53 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_53, 0, x_4); -lean_ctor_set(x_53, 1, x_52); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_4); +lean_ctor_set(x_52, 1, x_50); +if (lean_is_scalar(x_51)) { + x_53 = lean_alloc_ctor(1, 1, 0); +} else { + x_53 = x_51; +} +lean_ctor_set(x_53, 0, x_52); x_54 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_54, 0, x_53); -lean_ctor_set(x_36, 0, x_54); -x_11 = x_36; -x_12 = x_48; -goto block_34; -} -} -} -else -{ -lean_object* x_55; -x_55 = lean_ctor_get(x_36, 0); -lean_inc(x_55); -lean_dec(x_36); -if (lean_obj_tag(x_55) == 0) -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_56 = lean_ctor_get(x_35, 1); -lean_inc(x_56); -lean_dec(x_35); -x_57 = lean_ctor_get(x_55, 0); -lean_inc(x_57); -x_58 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_58, 0, x_55); -x_59 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_59, 0, x_58); -lean_ctor_set(x_59, 1, x_57); -x_60 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_60, 0, x_59); -x_61 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_61, 0, x_60); -x_11 = x_61; -x_12 = x_56; -goto block_34; -} -else -{ -lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -x_62 = lean_ctor_get(x_35, 1); -lean_inc(x_62); -lean_dec(x_35); -x_63 = lean_ctor_get(x_55, 0); -lean_inc(x_63); -if (lean_is_exclusive(x_55)) { - lean_ctor_release(x_55, 0); - x_64 = x_55; -} else { - lean_dec_ref(x_55); - x_64 = lean_box(0); -} -lean_inc(x_4); -x_65 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_65, 0, x_4); -lean_ctor_set(x_65, 1, x_63); -if (lean_is_scalar(x_64)) { - x_66 = lean_alloc_ctor(1, 1, 0); -} else { - x_66 = x_64; -} -lean_ctor_set(x_66, 0, x_65); -x_67 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_67, 0, x_66); -x_11 = x_67; -x_12 = x_62; -goto block_34; -} -} -} -} -else -{ -uint8_t x_68; -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_68 = !lean_is_exclusive(x_35); -if (x_68 == 0) -{ -return x_35; -} -else -{ -lean_object* x_69; lean_object* x_70; lean_object* x_71; -x_69 = lean_ctor_get(x_35, 0); -x_70 = lean_ctor_get(x_35, 1); -lean_inc(x_70); -lean_inc(x_69); -lean_dec(x_35); -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; +x_11 = x_54; +x_12 = x_31; +goto block_29; } } } } } -lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__10(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { if (lean_obj_tag(x_5) == 0) @@ -10198,7 +10012,7 @@ x_12 = lean_array_get_size(x_9); x_13 = lean_usize_of_nat(x_12); lean_dec(x_12); x_14 = 0; -x_15 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__11(x_1, x_2, x_3, x_4, x_10, x_9, x_13, x_14, x_11, x_7, x_8); +x_15 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5(x_1, x_2, x_3, x_4, x_10, x_9, x_13, x_14, x_11, x_7, x_8); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; @@ -10278,7 +10092,7 @@ x_31 = lean_ctor_get(x_28, 1); lean_inc(x_31); lean_dec(x_28); x_32 = lean_box(0); -x_33 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2(x_31, x_32, x_7, x_30); +x_33 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_31, x_32, x_7, x_30); return x_33; } else @@ -10332,7 +10146,7 @@ x_43 = lean_ctor_get(x_40, 1); lean_inc(x_43); lean_dec(x_40); x_44 = lean_box(0); -x_45 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2(x_43, x_44, x_7, x_42); +x_45 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_43, x_44, x_7, x_42); return x_45; } else @@ -10401,7 +10215,7 @@ x_58 = lean_array_get_size(x_55); x_59 = lean_usize_of_nat(x_58); lean_dec(x_58); x_60 = 0; -x_61 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12(x_1, x_2, x_3, x_56, x_55, x_59, x_60, x_57, x_7, x_8); +x_61 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6(x_1, x_2, x_3, x_56, x_55, x_59, x_60, x_57, x_7, x_8); if (lean_obj_tag(x_61) == 0) { lean_object* x_62; @@ -10481,7 +10295,7 @@ x_77 = lean_ctor_get(x_74, 1); lean_inc(x_77); lean_dec(x_74); x_78 = lean_box(0); -x_79 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2(x_77, x_78, x_7, x_76); +x_79 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_77, x_78, x_7, x_76); return x_79; } else @@ -10535,7 +10349,7 @@ x_89 = lean_ctor_get(x_86, 1); lean_inc(x_89); lean_dec(x_86); x_90 = lean_box(0); -x_91 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2(x_89, x_90, x_7, x_88); +x_91 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_89, x_90, x_7, x_88); return x_91; } else @@ -10594,556 +10408,462 @@ return x_100; } } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__13(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_11; lean_object* x_12; lean_object* x_35; uint8_t x_78; -x_78 = x_7 < x_6; -if (x_78 == 0) +lean_object* x_11; lean_object* x_12; lean_object* x_30; lean_object* x_31; uint8_t x_61; +x_61 = x_7 < x_6; +if (x_61 == 0) { -lean_object* x_79; lean_object* x_80; +lean_object* x_62; lean_object* x_63; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_79 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_79, 0, x_8); -x_80 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_80, 0, x_79); -lean_ctor_set(x_80, 1, x_10); -return x_80; +x_62 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_62, 0, x_8); +x_63 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_10); +return x_63; } else { -lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +lean_object* x_64; lean_object* x_65; lean_dec(x_8); -x_81 = lean_array_uget(x_5, x_7); +x_64 = lean_array_uget(x_5, x_7); lean_inc(x_2); -x_82 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___boxed), 2, 1); -lean_closure_set(x_82, 0, x_2); -x_83 = l_Lean_Elab_InfoTree_smallestNodes(x_82, x_81); -x_84 = l_Array_empty___closed__1; -x_85 = l_List_forIn_loop___at_Lean_Server_FileWorker_handleHover___spec__5(x_83, x_84, x_9, x_10); -x_86 = lean_ctor_get(x_85, 0); -lean_inc(x_86); -x_87 = lean_ctor_get(x_85, 1); -lean_inc(x_87); -lean_dec(x_85); -x_88 = lean_ctor_get(x_86, 0); -lean_inc(x_88); -lean_dec(x_86); -x_89 = l_Array_getMax_x3f___at_Lean_Server_FileWorker_handleHover___spec__6(x_88); -lean_dec(x_88); -if (lean_obj_tag(x_89) == 0) +x_65 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f(x_64, x_2); +if (lean_obj_tag(x_65) == 0) { -lean_object* x_90; lean_object* x_91; -x_90 = lean_box(0); +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_66 = lean_box(0); lean_inc(x_3); -x_91 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2(x_3, x_90, x_9, x_87); -x_35 = x_91; -goto block_77; +x_67 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_3, x_66, x_9, x_10); +x_68 = lean_ctor_get(x_67, 0); +lean_inc(x_68); +x_69 = lean_ctor_get(x_67, 1); +lean_inc(x_69); +lean_dec(x_67); +x_30 = x_68; +x_31 = x_69; +goto block_60; } else { -lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; -x_92 = lean_ctor_get(x_89, 0); -lean_inc(x_92); -lean_dec(x_89); -x_93 = lean_ctor_get(x_92, 1); +lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_70 = lean_ctor_get(x_65, 0); +lean_inc(x_70); +lean_dec(x_65); +x_71 = lean_ctor_get(x_70, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_70, 1); +lean_inc(x_72); +lean_dec(x_70); +x_73 = lean_ctor_get(x_72, 0); +lean_inc(x_73); +x_74 = lean_ctor_get(x_72, 1); +lean_inc(x_74); +lean_inc(x_74); +x_75 = lean_alloc_closure((void*)(l_Lean_Meta_ppExpr___boxed), 6, 1); +lean_closure_set(x_75, 0, x_74); +lean_inc(x_74); +x_76 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__2), 7, 1); +lean_closure_set(x_76, 0, x_74); +x_77 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); +lean_closure_set(x_77, 0, x_75); +lean_closure_set(x_77, 1, x_76); +lean_inc(x_73); +x_78 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_71, x_73, x_77, x_10); +if (lean_obj_tag(x_78) == 0) +{ +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_79 = lean_ctor_get(x_78, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_78, 1); +lean_inc(x_80); +lean_dec(x_78); +x_81 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__2; +x_82 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_79); +x_83 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__4; +x_84 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +x_85 = l_Lean_Expr_constName_x3f(x_74); +lean_dec(x_74); +if (lean_obj_tag(x_85) == 0) +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +lean_dec(x_73); +lean_dec(x_71); +x_86 = lean_box(0); +x_87 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__3(x_72, x_1, x_84, x_86, x_9, x_80); +x_88 = lean_ctor_get(x_87, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_87, 1); +lean_inc(x_89); +lean_dec(x_87); +x_30 = x_88; +x_31 = x_89; +goto block_60; +} +else +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_85, 0); +lean_inc(x_90); +lean_dec(x_85); +x_91 = lean_alloc_closure((void*)(l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__2___boxed), 6, 1); +lean_closure_set(x_91, 0, x_90); +x_92 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_71, x_73, x_91, x_80); +lean_dec(x_71); +if (lean_obj_tag(x_92) == 0) +{ +lean_object* x_93; +x_93 = lean_ctor_get(x_92, 0); lean_inc(x_93); -lean_dec(x_92); -x_94 = lean_ctor_get(x_93, 0); +if (lean_obj_tag(x_93) == 0) +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_94 = lean_ctor_get(x_92, 1); lean_inc(x_94); -x_95 = lean_ctor_get(x_93, 1); -lean_inc(x_95); +lean_dec(x_92); +x_95 = lean_box(0); +x_96 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__3(x_72, x_1, x_84, x_95, x_9, x_94); +x_97 = lean_ctor_get(x_96, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_96, 1); +lean_inc(x_98); +lean_dec(x_96); +x_30 = x_97; +x_31 = x_98; +goto block_60; +} +else +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_99 = lean_ctor_get(x_92, 1); +lean_inc(x_99); +lean_dec(x_92); +x_100 = lean_ctor_get(x_93, 0); +lean_inc(x_100); lean_dec(x_93); -x_96 = lean_ctor_get(x_95, 0); -lean_inc(x_96); -x_97 = lean_ctor_get(x_95, 1); -lean_inc(x_97); -lean_inc(x_97); -x_98 = lean_alloc_closure((void*)(l_Lean_Meta_ppExpr___boxed), 6, 1); -lean_closure_set(x_98, 0, x_97); -lean_inc(x_97); -x_99 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__3), 7, 1); -lean_closure_set(x_99, 0, x_97); -x_100 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); -lean_closure_set(x_100, 0, x_98); -lean_closure_set(x_100, 1, x_99); -lean_inc(x_96); -x_101 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_94, x_96, x_100, x_87); -if (lean_obj_tag(x_101) == 0) -{ -lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; -x_102 = lean_ctor_get(x_101, 0); -lean_inc(x_102); -x_103 = lean_ctor_get(x_101, 1); -lean_inc(x_103); -lean_dec(x_101); -x_104 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__2; -x_105 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_105, 0, x_104); -lean_ctor_set(x_105, 1, x_102); -x_106 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__4; +x_101 = l_Std_Format_join___closed__1; +x_102 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_102, 0, x_101); +lean_ctor_set(x_102, 1, x_84); +x_103 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__6; +x_104 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_104, 0, x_102); +lean_ctor_set(x_104, 1, x_103); +x_105 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_105, 0, x_100); +x_106 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_106, 0, x_104); +lean_ctor_set(x_106, 1, x_105); x_107 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_107, 0, x_105); -lean_ctor_set(x_107, 1, x_106); -if (lean_obj_tag(x_97) == 4) -{ -lean_object* x_108; lean_object* x_109; lean_object* x_110; -x_108 = lean_ctor_get(x_97, 0); -lean_inc(x_108); -lean_dec(x_97); -x_109 = lean_alloc_closure((void*)(l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__8___boxed), 6, 1); -lean_closure_set(x_109, 0, x_108); -x_110 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_94, x_96, x_109, x_103); -lean_dec(x_94); -if (lean_obj_tag(x_110) == 0) -{ -lean_object* x_111; -x_111 = lean_ctor_get(x_110, 0); +lean_ctor_set(x_107, 0, x_106); +lean_ctor_set(x_107, 1, x_101); +x_108 = lean_box(0); +x_109 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__3(x_72, x_1, x_107, x_108, x_9, x_99); +x_110 = lean_ctor_get(x_109, 0); +lean_inc(x_110); +x_111 = lean_ctor_get(x_109, 1); lean_inc(x_111); -if (lean_obj_tag(x_111) == 0) -{ -lean_object* x_112; lean_object* x_113; lean_object* x_114; -x_112 = lean_ctor_get(x_110, 1); -lean_inc(x_112); -lean_dec(x_110); -x_113 = lean_box(0); -x_114 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4(x_95, x_1, x_107, x_113, x_9, x_112); -x_35 = x_114; -goto block_77; -} -else -{ -lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; -x_115 = lean_ctor_get(x_110, 1); -lean_inc(x_115); -lean_dec(x_110); -x_116 = lean_ctor_get(x_111, 0); -lean_inc(x_116); -lean_dec(x_111); -x_117 = l_Std_Format_join___closed__1; -x_118 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_118, 0, x_117); -lean_ctor_set(x_118, 1, x_107); -x_119 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__6; -x_120 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_120, 0, x_118); -lean_ctor_set(x_120, 1, x_119); -x_121 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_121, 0, x_116); -x_122 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_122, 0, x_120); -lean_ctor_set(x_122, 1, x_121); -x_123 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_123, 0, x_122); -lean_ctor_set(x_123, 1, x_117); -x_124 = lean_box(0); -x_125 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4(x_95, x_1, x_123, x_124, x_9, x_115); -x_35 = x_125; -goto block_77; +lean_dec(x_109); +x_30 = x_110; +x_31 = x_111; +goto block_60; } } else { -uint8_t x_126; -lean_dec(x_107); -lean_dec(x_95); -x_126 = !lean_is_exclusive(x_110); -if (x_126 == 0) +uint8_t x_112; +lean_dec(x_84); +lean_dec(x_72); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_112 = !lean_is_exclusive(x_92); +if (x_112 == 0) { -x_35 = x_110; -goto block_77; +return x_92; } else { -lean_object* x_127; lean_object* x_128; lean_object* x_129; -x_127 = lean_ctor_get(x_110, 0); -x_128 = lean_ctor_get(x_110, 1); -lean_inc(x_128); -lean_inc(x_127); -lean_dec(x_110); -x_129 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_129, 0, x_127); -lean_ctor_set(x_129, 1, x_128); -x_35 = x_129; -goto block_77; +lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_113 = lean_ctor_get(x_92, 0); +x_114 = lean_ctor_get(x_92, 1); +lean_inc(x_114); +lean_inc(x_113); +lean_dec(x_92); +x_115 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_115, 0, x_113); +lean_ctor_set(x_115, 1, x_114); +return x_115; +} } } } else { -lean_object* x_130; lean_object* x_131; -lean_dec(x_97); -lean_dec(x_96); -lean_dec(x_94); -x_130 = lean_box(0); -x_131 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4(x_95, x_1, x_107, x_130, x_9, x_103); -x_35 = x_131; -goto block_77; -} +uint8_t x_116; +lean_dec(x_74); +lean_dec(x_73); +lean_dec(x_72); +lean_dec(x_71); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_116 = !lean_is_exclusive(x_78); +if (x_116 == 0) +{ +return x_78; } else { -uint8_t x_132; -lean_dec(x_97); -lean_dec(x_96); -lean_dec(x_95); -lean_dec(x_94); -x_132 = !lean_is_exclusive(x_101); -if (x_132 == 0) -{ -x_35 = x_101; -goto block_77; -} -else -{ -lean_object* x_133; lean_object* x_134; lean_object* x_135; -x_133 = lean_ctor_get(x_101, 0); -x_134 = lean_ctor_get(x_101, 1); -lean_inc(x_134); -lean_inc(x_133); -lean_dec(x_101); -x_135 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_135, 0, x_133); -lean_ctor_set(x_135, 1, x_134); -x_35 = x_135; -goto block_77; +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_78, 0); +x_118 = lean_ctor_get(x_78, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_78); +x_119 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_119, 0, x_117); +lean_ctor_set(x_119, 1, x_118); +return x_119; } } } } -block_34: -{ -if (lean_obj_tag(x_11) == 0) +block_29: { uint8_t x_13; -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_11); -lean_ctor_set(x_14, 1, x_12); -return x_14; -} -else +x_14 = lean_ctor_get(x_11, 0); +if (lean_obj_tag(x_14) == 0) { -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_ctor_get(x_11, 0); +lean_object* x_15; lean_object* x_16; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); -lean_dec(x_11); -x_16 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_16, 0, x_15); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_16); -lean_ctor_set(x_17, 1, x_12); -return x_17; -} +lean_dec(x_14); +lean_ctor_set(x_11, 0, x_15); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_12); +return x_16; } else { -uint8_t x_18; -x_18 = !lean_is_exclusive(x_11); -if (x_18 == 0) -{ -lean_object* x_19; -x_19 = lean_ctor_get(x_11, 0); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -lean_dec(x_19); -lean_ctor_set(x_11, 0, x_20); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_11); -lean_ctor_set(x_21, 1, x_12); -return x_21; -} -else -{ -lean_object* x_22; size_t x_23; size_t x_24; +lean_object* x_17; size_t x_18; size_t x_19; lean_free_object(x_11); -x_22 = lean_ctor_get(x_19, 0); -lean_inc(x_22); -lean_dec(x_19); -x_23 = 1; -x_24 = x_7 + x_23; -x_7 = x_24; -x_8 = x_22; +x_17 = lean_ctor_get(x_14, 0); +lean_inc(x_17); +lean_dec(x_14); +x_18 = 1; +x_19 = x_7 + x_18; +x_7 = x_19; +x_8 = x_17; x_10 = x_12; goto _start; } } else { -lean_object* x_26; -x_26 = lean_ctor_get(x_11, 0); -lean_inc(x_26); +lean_object* x_21; +x_21 = lean_ctor_get(x_11, 0); +lean_inc(x_21); lean_dec(x_11); -if (lean_obj_tag(x_26) == 0) +if (lean_obj_tag(x_21) == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_27 = lean_ctor_get(x_26, 0); -lean_inc(x_27); -lean_dec(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_12); -return x_29; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_23, 0, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_12); +return x_24; } else { -lean_object* x_30; size_t x_31; size_t x_32; -x_30 = lean_ctor_get(x_26, 0); -lean_inc(x_30); -lean_dec(x_26); -x_31 = 1; -x_32 = x_7 + x_31; -x_7 = x_32; -x_8 = x_30; +lean_object* x_25; size_t x_26; size_t x_27; +x_25 = lean_ctor_get(x_21, 0); +lean_inc(x_25); +lean_dec(x_21); +x_26 = 1; +x_27 = x_7 + x_26; +x_7 = x_27; +x_8 = x_25; x_10 = x_12; goto _start; } } } -} -block_77: +block_60: { -if (lean_obj_tag(x_35) == 0) +uint8_t x_32; +x_32 = !lean_is_exclusive(x_30); +if (x_32 == 0) { -lean_object* x_36; -x_36 = lean_ctor_get(x_35, 0); -lean_inc(x_36); -if (lean_obj_tag(x_36) == 0) +lean_object* x_33; +x_33 = lean_ctor_get(x_30, 0); +if (lean_obj_tag(x_33) == 0) { -lean_object* x_37; uint8_t x_38; -x_37 = lean_ctor_get(x_35, 1); -lean_inc(x_37); -lean_dec(x_35); -x_38 = !lean_is_exclusive(x_36); -if (x_38 == 0) +uint8_t x_34; +x_34 = !lean_is_exclusive(x_33); +if (x_34 == 0) { -x_11 = x_36; -x_12 = x_37; -goto block_34; +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_33, 0); +lean_inc(x_35); +x_36 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_36, 0, x_35); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_35); +lean_ctor_set(x_33, 0, x_37); +x_11 = x_30; +x_12 = x_31; +goto block_29; } else { -lean_object* x_39; lean_object* x_40; -x_39 = lean_ctor_get(x_36, 0); -lean_inc(x_39); -lean_dec(x_36); -x_40 = lean_alloc_ctor(0, 1, 0); +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_38 = lean_ctor_get(x_33, 0); +lean_inc(x_38); +lean_dec(x_33); +lean_inc(x_38); +x_39 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_39, 0, x_38); +x_40 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_40, 0, x_39); -x_11 = x_40; -x_12 = x_37; -goto block_34; +lean_ctor_set(x_40, 1, x_38); +x_41 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_30, 0, x_41); +x_11 = x_30; +x_12 = x_31; +goto block_29; } } else { -uint8_t x_41; -x_41 = !lean_is_exclusive(x_36); -if (x_41 == 0) +uint8_t x_42; +x_42 = !lean_is_exclusive(x_33); +if (x_42 == 0) { -lean_object* x_42; -x_42 = lean_ctor_get(x_36, 0); -if (lean_obj_tag(x_42) == 0) -{ -lean_object* x_43; uint8_t x_44; -x_43 = lean_ctor_get(x_35, 1); -lean_inc(x_43); -lean_dec(x_35); -x_44 = !lean_is_exclusive(x_42); -if (x_44 == 0) +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_33, 0); +lean_inc(x_4); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_4); +lean_ctor_set(x_44, 1, x_43); +lean_ctor_set(x_33, 0, x_44); +x_11 = x_30; +x_12 = x_31; +goto block_29; +} +else { lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_42, 0); +x_45 = lean_ctor_get(x_33, 0); lean_inc(x_45); -x_46 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_46, 0, x_45); -x_47 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_47, 0, x_46); -lean_ctor_set(x_47, 1, x_45); -lean_ctor_set(x_42, 0, x_47); -x_11 = x_36; -x_12 = x_43; -goto block_34; -} -else -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_48 = lean_ctor_get(x_42, 0); -lean_inc(x_48); -lean_dec(x_42); -lean_inc(x_48); -x_49 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_49, 0, x_48); -x_50 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_50, 1, x_48); -x_51 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_51, 0, x_50); -lean_ctor_set(x_36, 0, x_51); -x_11 = x_36; -x_12 = x_43; -goto block_34; -} -} -else -{ -lean_object* x_52; uint8_t x_53; -x_52 = lean_ctor_get(x_35, 1); -lean_inc(x_52); -lean_dec(x_35); -x_53 = !lean_is_exclusive(x_42); -if (x_53 == 0) -{ -lean_object* x_54; lean_object* x_55; -x_54 = lean_ctor_get(x_42, 0); +lean_dec(x_33); lean_inc(x_4); -x_55 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_55, 0, x_4); -lean_ctor_set(x_55, 1, x_54); -lean_ctor_set(x_42, 0, x_55); -x_11 = x_36; -x_12 = x_52; -goto block_34; +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_4); +lean_ctor_set(x_46, 1, x_45); +x_47 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_30, 0, x_47); +x_11 = x_30; +x_12 = x_31; +goto block_29; +} +} } else { -lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_56 = lean_ctor_get(x_42, 0); -lean_inc(x_56); -lean_dec(x_42); +lean_object* x_48; +x_48 = lean_ctor_get(x_30, 0); +lean_inc(x_48); +lean_dec(x_30); +if (lean_obj_tag(x_48) == 0) +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_49 = lean_ctor_get(x_48, 0); +lean_inc(x_49); +if (lean_is_exclusive(x_48)) { + lean_ctor_release(x_48, 0); + x_50 = x_48; +} else { + lean_dec_ref(x_48); + x_50 = lean_box(0); +} +lean_inc(x_49); +x_51 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_51, 0, x_49); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_49); +if (lean_is_scalar(x_50)) { + x_53 = lean_alloc_ctor(0, 1, 0); +} else { + x_53 = x_50; +} +lean_ctor_set(x_53, 0, x_52); +x_54 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_54, 0, x_53); +x_11 = x_54; +x_12 = x_31; +goto block_29; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_55 = lean_ctor_get(x_48, 0); +lean_inc(x_55); +if (lean_is_exclusive(x_48)) { + lean_ctor_release(x_48, 0); + x_56 = x_48; +} else { + lean_dec_ref(x_48); + x_56 = lean_box(0); +} lean_inc(x_4); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_4); -lean_ctor_set(x_57, 1, x_56); -x_58 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_57, 1, x_55); +if (lean_is_scalar(x_56)) { + x_58 = lean_alloc_ctor(1, 1, 0); +} else { + x_58 = x_56; +} lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_36, 0, x_58); -x_11 = x_36; -x_12 = x_52; -goto block_34; -} -} -} -else -{ -lean_object* x_59; -x_59 = lean_ctor_get(x_36, 0); -lean_inc(x_59); -lean_dec(x_36); -if (lean_obj_tag(x_59) == 0) -{ -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; -x_60 = lean_ctor_get(x_35, 1); -lean_inc(x_60); -lean_dec(x_35); -x_61 = lean_ctor_get(x_59, 0); -lean_inc(x_61); -if (lean_is_exclusive(x_59)) { - lean_ctor_release(x_59, 0); - x_62 = x_59; -} else { - lean_dec_ref(x_59); - x_62 = lean_box(0); -} -lean_inc(x_61); -x_63 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_63, 0, x_61); -x_64 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_64, 0, x_63); -lean_ctor_set(x_64, 1, x_61); -if (lean_is_scalar(x_62)) { - x_65 = lean_alloc_ctor(0, 1, 0); -} else { - x_65 = x_62; -} -lean_ctor_set(x_65, 0, x_64); -x_66 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_66, 0, x_65); -x_11 = x_66; -x_12 = x_60; -goto block_34; -} -else -{ -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_67 = lean_ctor_get(x_35, 1); -lean_inc(x_67); -lean_dec(x_35); -x_68 = lean_ctor_get(x_59, 0); -lean_inc(x_68); -if (lean_is_exclusive(x_59)) { - lean_ctor_release(x_59, 0); - x_69 = x_59; -} else { - lean_dec_ref(x_59); - x_69 = lean_box(0); -} -lean_inc(x_4); -x_70 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_70, 0, x_4); -lean_ctor_set(x_70, 1, x_68); -if (lean_is_scalar(x_69)) { - x_71 = lean_alloc_ctor(1, 1, 0); -} else { - x_71 = x_69; -} -lean_ctor_set(x_71, 0, x_70); -x_72 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_72, 0, x_71); -x_11 = x_72; -x_12 = x_67; -goto block_34; -} -} -} -} -else -{ -uint8_t x_73; -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_73 = !lean_is_exclusive(x_35); -if (x_73 == 0) -{ -return x_35; -} -else -{ -lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_74 = lean_ctor_get(x_35, 0); -x_75 = lean_ctor_get(x_35, 1); -lean_inc(x_75); -lean_inc(x_74); -lean_dec(x_35); -x_76 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_76, 0, x_74); -lean_ctor_set(x_76, 1, x_75); -return x_76; +x_59 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_59, 0, x_58); +x_11 = x_59; +x_12 = x_31; +goto block_29; } } } } } -lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; @@ -11155,7 +10875,7 @@ lean_ctor_set(x_6, 1, x_4); return x_6; } } -lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; lean_object* x_9; @@ -11163,7 +10883,7 @@ x_8 = lean_ctor_get(x_4, 0); lean_inc(x_5); lean_inc(x_3); lean_inc(x_2); -x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__10(x_1, x_2, x_3, x_5, x_8, x_5, x_6, x_7); +x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__4(x_1, x_2, x_3, x_5, x_8, x_5, x_6, x_7); lean_dec(x_5); if (lean_obj_tag(x_9) == 0) { @@ -11285,7 +11005,7 @@ x_34 = lean_array_get_size(x_31); x_35 = lean_usize_of_nat(x_34); lean_dec(x_34); x_36 = 0; -x_37 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__13(x_1, x_2, x_3, x_32, x_31, x_35, x_36, x_33, x_6, x_29); +x_37 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__7(x_1, x_2, x_3, x_32, x_31, x_35, x_36, x_33, x_6, x_29); if (lean_obj_tag(x_37) == 0) { lean_object* x_38; @@ -11365,7 +11085,7 @@ x_53 = lean_ctor_get(x_50, 1); lean_inc(x_53); lean_dec(x_50); x_54 = lean_box(0); -x_55 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1(x_53, x_54, x_6, x_52); +x_55 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1(x_53, x_54, x_6, x_52); return x_55; } else @@ -11419,7 +11139,7 @@ x_65 = lean_ctor_get(x_62, 1); lean_inc(x_65); lean_dec(x_62); x_66 = lean_box(0); -x_67 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1(x_65, x_66, x_6, x_64); +x_67 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1(x_65, x_66, x_6, x_64); return x_67; } else @@ -11530,7 +11250,7 @@ x_88 = lean_array_get_size(x_85); x_89 = lean_usize_of_nat(x_88); lean_dec(x_88); x_90 = 0; -x_91 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__13(x_1, x_2, x_3, x_86, x_85, x_89, x_90, x_87, x_6, x_83); +x_91 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__7(x_1, x_2, x_3, x_86, x_85, x_89, x_90, x_87, x_6, x_83); if (lean_obj_tag(x_91) == 0) { lean_object* x_92; @@ -11598,7 +11318,7 @@ x_103 = lean_ctor_get(x_99, 1); lean_inc(x_103); lean_dec(x_99); x_104 = lean_box(0); -x_105 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1(x_103, x_104, x_6, x_102); +x_105 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1(x_103, x_104, x_6, x_102); return x_105; } else @@ -11689,276 +11409,264 @@ return x_118; } } } -static lean_object* _init_l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___closed__1() { +uint8_t l_Lean_Server_FileWorker_handleHover___rarg___lambda__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; uint8_t x_4; +x_3 = l_Lean_Server_Snapshots_Snapshot_endPos(x_2); +x_4 = lean_nat_dec_lt(x_1, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_8 = l_Lean_Server_Snapshots_Snapshot_toCmdState(x_5); +x_9 = lean_ctor_get(x_8, 7); +lean_inc(x_9); +lean_dec(x_8); +x_10 = lean_ctor_get(x_9, 1); +lean_inc(x_10); +lean_dec(x_9); +x_11 = lean_box(0); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_1); +lean_ctor_set(x_12, 1, x_11); +lean_inc(x_12); +x_13 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3(x_2, x_3, x_12, x_10, x_12, x_6, x_7); +lean_dec(x_10); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +if (lean_obj_tag(x_14) == 0) +{ +uint8_t x_15; +lean_dec(x_4); +x_15 = !lean_is_exclusive(x_13); +if (x_15 == 0) +{ +lean_object* x_16; uint8_t x_17; +x_16 = lean_ctor_get(x_13, 0); +lean_dec(x_16); +x_17 = !lean_is_exclusive(x_14); +if (x_17 == 0) +{ +return x_13; +} +else +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_ctor_get(x_14, 0); +lean_inc(x_18); +lean_dec(x_14); +x_19 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_13, 0, x_19); +return x_13; +} +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_20 = lean_ctor_get(x_13, 1); +lean_inc(x_20); +lean_dec(x_13); +x_21 = lean_ctor_get(x_14, 0); +lean_inc(x_21); +if (lean_is_exclusive(x_14)) { + lean_ctor_release(x_14, 0); + x_22 = x_14; +} else { + lean_dec_ref(x_14); + x_22 = lean_box(0); +} +if (lean_is_scalar(x_22)) { + x_23 = lean_alloc_ctor(0, 1, 0); +} else { + x_23 = x_22; +} +lean_ctor_set(x_23, 0, x_21); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_20); +return x_24; +} +} +else +{ +uint8_t x_25; +x_25 = !lean_is_exclusive(x_14); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; +x_26 = lean_ctor_get(x_14, 0); +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +lean_dec(x_26); +if (lean_obj_tag(x_27) == 0) +{ +uint8_t x_28; +lean_free_object(x_14); +x_28 = !lean_is_exclusive(x_13); +if (x_28 == 0) +{ +lean_object* x_29; +x_29 = lean_ctor_get(x_13, 0); +lean_dec(x_29); +lean_ctor_set(x_13, 0, x_4); +return x_13; +} +else +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_13, 1); +lean_inc(x_30); +lean_dec(x_13); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_4); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +else +{ +uint8_t x_32; +lean_dec(x_4); +x_32 = !lean_is_exclusive(x_13); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; +x_33 = lean_ctor_get(x_13, 0); +lean_dec(x_33); +x_34 = lean_ctor_get(x_27, 0); +lean_inc(x_34); +lean_dec(x_27); +lean_ctor_set(x_14, 0, x_34); +return x_13; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_13, 1); +lean_inc(x_35); +lean_dec(x_13); +x_36 = lean_ctor_get(x_27, 0); +lean_inc(x_36); +lean_dec(x_27); +lean_ctor_set(x_14, 0, x_36); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_14); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; +x_38 = lean_ctor_get(x_14, 0); +lean_inc(x_38); +lean_dec(x_14); +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +lean_dec(x_38); +if (lean_obj_tag(x_39) == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_13, 1); +lean_inc(x_40); +if (lean_is_exclusive(x_13)) { + lean_ctor_release(x_13, 0); + lean_ctor_release(x_13, 1); + x_41 = x_13; +} else { + lean_dec_ref(x_13); + x_41 = lean_box(0); +} +if (lean_is_scalar(x_41)) { + x_42 = lean_alloc_ctor(0, 2, 0); +} else { + x_42 = x_41; +} +lean_ctor_set(x_42, 0, x_4); +lean_ctor_set(x_42, 1, x_40); +return x_42; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +lean_dec(x_4); +x_43 = lean_ctor_get(x_13, 1); +lean_inc(x_43); +if (lean_is_exclusive(x_13)) { + lean_ctor_release(x_13, 0); + lean_ctor_release(x_13, 1); + x_44 = x_13; +} else { + lean_dec_ref(x_13); + x_44 = lean_box(0); +} +x_45 = lean_ctor_get(x_39, 0); +lean_inc(x_45); +lean_dec(x_39); +x_46 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_46, 0, x_45); +if (lean_is_scalar(x_44)) { + x_47 = lean_alloc_ctor(0, 2, 0); +} else { + x_47 = x_44; +} +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_43); +return x_47; +} +} +} +} +else +{ +uint8_t x_48; +lean_dec(x_4); +x_48 = !lean_is_exclusive(x_13); +if (x_48 == 0) +{ +return x_13; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_13, 0); +x_50 = lean_ctor_get(x_13, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_13); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; +} +} +} +} +static lean_object* _init_l_Lean_Server_FileWorker_handleHover___rarg___closed__1() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_FileWorker_RequestError_fileChanged; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); +x_1 = l_IO_AsyncList_waitFind_x3f___rarg___closed__1; +x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1___rarg___boxed), 3, 1); +lean_closure_set(x_2, 0, x_1); return x_2; } } -lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_6; -lean_dec(x_2); -x_6 = lean_ctor_get(x_3, 0); -switch (lean_obj_tag(x_6)) { -case 0: -{ -lean_object* x_7; lean_object* x_8; -x_7 = l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___closed__1; -x_8 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_8, 0, x_7); -lean_ctor_set(x_8, 1, x_5); -return x_8; -} -case 1: -{ -lean_object* x_9; lean_object* x_10; -x_9 = l_IO_AsyncList_waitFind_x3f___rarg___closed__1; -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_9); -lean_ctor_set(x_10, 1, x_5); -return x_10; -} -default: -{ -lean_object* x_11; lean_object* x_12; -x_11 = lean_ctor_get(x_6, 0); -lean_inc(x_11); -x_12 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_12, 0, x_11); -lean_ctor_set(x_12, 1, x_5); -return x_12; -} -} -} -else -{ -lean_object* x_13; -x_13 = lean_ctor_get(x_3, 0); -if (lean_obj_tag(x_13) == 0) -{ -lean_object* x_14; lean_object* x_15; -lean_dec(x_2); -x_14 = l_IO_AsyncList_waitFind_x3f___rarg___closed__1; -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_5); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_16 = lean_ctor_get(x_13, 0); -x_17 = l_Lean_Server_Snapshots_Snapshot_toCmdState(x_16); -x_18 = lean_ctor_get(x_17, 7); -lean_inc(x_18); -lean_dec(x_17); -x_19 = lean_ctor_get(x_18, 1); -lean_inc(x_19); -lean_dec(x_18); -x_20 = lean_box(0); -x_21 = l_Array_findSomeM_x3f___rarg___closed__1; -x_22 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9(x_1, x_2, x_21, x_19, x_21, x_4, x_5); -lean_dec(x_19); -if (lean_obj_tag(x_22) == 0) -{ -lean_object* x_23; -x_23 = lean_ctor_get(x_22, 0); -lean_inc(x_23); -if (lean_obj_tag(x_23) == 0) -{ -uint8_t x_24; -x_24 = !lean_is_exclusive(x_22); -if (x_24 == 0) -{ -lean_object* x_25; uint8_t x_26; -x_25 = lean_ctor_get(x_22, 0); -lean_dec(x_25); -x_26 = !lean_is_exclusive(x_23); -if (x_26 == 0) -{ -return x_22; -} -else -{ -lean_object* x_27; lean_object* x_28; -x_27 = lean_ctor_get(x_23, 0); -lean_inc(x_27); -lean_dec(x_23); -x_28 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_28, 0, x_27); -lean_ctor_set(x_22, 0, x_28); -return x_22; -} -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_29 = lean_ctor_get(x_22, 1); -lean_inc(x_29); -lean_dec(x_22); -x_30 = lean_ctor_get(x_23, 0); -lean_inc(x_30); -if (lean_is_exclusive(x_23)) { - lean_ctor_release(x_23, 0); - x_31 = x_23; -} else { - lean_dec_ref(x_23); - x_31 = lean_box(0); -} -if (lean_is_scalar(x_31)) { - x_32 = lean_alloc_ctor(0, 1, 0); -} else { - x_32 = x_31; -} -lean_ctor_set(x_32, 0, x_30); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_29); -return x_33; -} -} -else -{ -uint8_t x_34; -x_34 = !lean_is_exclusive(x_23); -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -x_35 = lean_ctor_get(x_23, 0); -x_36 = lean_ctor_get(x_35, 0); -lean_inc(x_36); -lean_dec(x_35); -if (lean_obj_tag(x_36) == 0) -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; -lean_free_object(x_23); -x_37 = lean_ctor_get(x_22, 1); -lean_inc(x_37); -lean_dec(x_22); -x_38 = lean_box(0); -x_39 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1(x_20, x_38, x_4, x_37); -return x_39; -} -else -{ -uint8_t x_40; -x_40 = !lean_is_exclusive(x_22); -if (x_40 == 0) -{ -lean_object* x_41; lean_object* x_42; -x_41 = lean_ctor_get(x_22, 0); -lean_dec(x_41); -x_42 = lean_ctor_get(x_36, 0); -lean_inc(x_42); -lean_dec(x_36); -lean_ctor_set(x_23, 0, x_42); -return x_22; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_22, 1); -lean_inc(x_43); -lean_dec(x_22); -x_44 = lean_ctor_get(x_36, 0); -lean_inc(x_44); -lean_dec(x_36); -lean_ctor_set(x_23, 0, x_44); -x_45 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_45, 0, x_23); -lean_ctor_set(x_45, 1, x_43); -return x_45; -} -} -} -else -{ -lean_object* x_46; lean_object* x_47; -x_46 = lean_ctor_get(x_23, 0); -lean_inc(x_46); -lean_dec(x_23); -x_47 = lean_ctor_get(x_46, 0); -lean_inc(x_47); -lean_dec(x_46); -if (lean_obj_tag(x_47) == 0) -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_48 = lean_ctor_get(x_22, 1); -lean_inc(x_48); -lean_dec(x_22); -x_49 = lean_box(0); -x_50 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1(x_20, x_49, x_4, x_48); -return x_50; -} -else -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_51 = lean_ctor_get(x_22, 1); -lean_inc(x_51); -if (lean_is_exclusive(x_22)) { - lean_ctor_release(x_22, 0); - lean_ctor_release(x_22, 1); - x_52 = x_22; -} else { - lean_dec_ref(x_22); - x_52 = lean_box(0); -} -x_53 = lean_ctor_get(x_47, 0); -lean_inc(x_53); -lean_dec(x_47); -x_54 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_54, 0, x_53); -if (lean_is_scalar(x_52)) { - x_55 = lean_alloc_ctor(0, 2, 0); -} else { - x_55 = x_52; -} -lean_ctor_set(x_55, 0, x_54); -lean_ctor_set(x_55, 1, x_51); -return x_55; -} -} -} -} -else -{ -uint8_t x_56; -x_56 = !lean_is_exclusive(x_22); -if (x_56 == 0) -{ -return x_22; -} -else -{ -lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_57 = lean_ctor_get(x_22, 0); -x_58 = lean_ctor_get(x_22, 1); -lean_inc(x_58); -lean_inc(x_57); -lean_dec(x_22); -x_59 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_59, 0, x_57); -lean_ctor_set(x_59, 1, x_58); -return x_59; -} -} -} -} -} -} lean_object* l_Lean_Server_FileWorker_handleHover___rarg(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; -x_4 = lean_ctor_get(x_2, 3); +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_4 = lean_ctor_get(x_2, 4); lean_inc(x_4); x_5 = lean_st_ref_get(x_4, x_3); lean_dec(x_4); @@ -11976,51 +11684,20 @@ x_10 = lean_ctor_get(x_1, 1); lean_inc(x_10); lean_dec(x_1); x_11 = l_Lean_FileMap_lspPosToUtf8Pos(x_9, x_10); -x_12 = lean_ctor_get(x_6, 2); -lean_inc(x_12); -lean_dec(x_6); lean_inc(x_11); -x_13 = l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_handleHover___spec__1(x_11, x_12, x_7); -if (lean_obj_tag(x_13) == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_13, 1); -lean_inc(x_15); -lean_dec(x_13); -x_16 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___boxed), 5, 2); -lean_closure_set(x_16, 0, x_9); -lean_closure_set(x_16, 1, x_11); -x_17 = l_Lean_Server_FileWorker_mapTask___rarg(x_14, x_16, x_2, x_15); +x_12 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___boxed), 2, 1); +lean_closure_set(x_12, 0, x_11); +x_13 = lean_box(0); +x_14 = l_IO_AsyncList_waitFind_x3f___rarg___closed__1; +x_15 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover___rarg___lambda__2___boxed), 7, 4); +lean_closure_set(x_15, 0, x_13); +lean_closure_set(x_15, 1, x_9); +lean_closure_set(x_15, 2, x_11); +lean_closure_set(x_15, 3, x_14); +x_16 = l_Lean_Server_FileWorker_handleHover___rarg___closed__1; +x_17 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg(x_6, x_12, x_16, x_15, x_2, x_7); return x_17; } -else -{ -uint8_t x_18; -lean_dec(x_11); -lean_dec(x_9); -lean_dec(x_2); -x_18 = !lean_is_exclusive(x_13); -if (x_18 == 0) -{ -return x_13; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_13, 0); -x_20 = lean_ctor_get(x_13, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_13); -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -} } lean_object* l_Lean_Server_FileWorker_handleHover(lean_object* x_1) { _start: @@ -12030,68 +11707,20 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover___rarg), 3 return x_2; } } -lean_object* l_Array_anyMUnsafe_any___at_Lean_Server_FileWorker_handleHover___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -size_t x_5; size_t x_6; uint8_t x_7; lean_object* x_8; -x_5 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_6 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_7 = l_Array_anyMUnsafe_any___at_Lean_Server_FileWorker_handleHover___spec__4(x_1, x_2, x_5, x_6); +lean_object* x_4; +x_4 = l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1___rarg(x_1, x_2, x_3); lean_dec(x_2); -lean_dec(x_1); -x_8 = lean_box(x_7); -return x_8; -} -} -lean_object* l_Array_contains___at_Lean_Server_FileWorker_handleHover___spec__3___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = l_Array_contains___at_Lean_Server_FileWorker_handleHover___spec__3(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -x_4 = lean_box(x_3); return x_4; } } -lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleHover___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_List_forIn_loop___at_Lean_Server_FileWorker_handleHover___spec__5(x_1, x_2, x_3, x_4); -lean_dec(x_3); -return x_5; -} -} -lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleHover___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -size_t x_5; size_t x_6; lean_object* x_7; -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_7 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleHover___spec__7(x_1, x_5, x_6, x_4); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Array_getMax_x3f___at_Lean_Server_FileWorker_handleHover___spec__6___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Array_getMax_x3f___at_Lean_Server_FileWorker_handleHover___spec__6(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; -x_7 = l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__8(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l_Lean_findDocString_x3f___at_Lean_Server_FileWorker_handleHover___spec__2(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); @@ -12099,7 +11728,7 @@ lean_dec(x_2); return x_7; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__11___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { size_t x_12; size_t x_13; lean_object* x_14; @@ -12107,7 +11736,7 @@ x_12 = lean_unbox_usize(x_7); lean_dec(x_7); x_13 = lean_unbox_usize(x_8); lean_dec(x_8); -x_14 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__11(x_1, x_2, x_3, x_4, x_5, x_6, x_12, x_13, x_9, x_10, x_11); +x_14 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5(x_1, x_2, x_3, x_4, x_5, x_6, x_12, x_13, x_9, x_10, x_11); lean_dec(x_10); lean_dec(x_6); lean_dec(x_4); @@ -12115,38 +11744,28 @@ lean_dec(x_1); return x_14; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1(x_1, x_2); -lean_dec(x_1); -x_4 = lean_box(x_3); -return x_4; -} -} -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; -x_5 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__2(x_1, x_2, x_3, x_4); +x_5 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___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) { _start: { lean_object* x_7; -x_7 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__4(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); return x_7; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { size_t x_11; size_t x_12; lean_object* x_13; @@ -12154,18 +11773,18 @@ x_11 = lean_unbox_usize(x_6); lean_dec(x_6); x_12 = lean_unbox_usize(x_7); lean_dec(x_7); -x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12(x_1, x_2, x_3, x_4, x_5, x_11, x_12, x_8, x_9, x_10); +x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6(x_1, x_2, x_3, x_4, x_5, x_11, x_12, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_5); lean_dec(x_1); return x_13; } } -lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__10___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* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; -x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__10(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); @@ -12173,7 +11792,7 @@ lean_dec(x_1); return x_9; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__13___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { size_t x_11; size_t x_12; lean_object* x_13; @@ -12181,43 +11800,54 @@ x_11 = lean_unbox_usize(x_6); lean_dec(x_6); x_12 = lean_unbox_usize(x_7); lean_dec(x_7); -x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__13(x_1, x_2, x_3, x_4, x_5, x_11, x_12, x_8, x_9, x_10); +x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__7(x_1, x_2, x_3, x_4, x_5, x_11, x_12, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_5); lean_dec(x_1); return x_13; } } -lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; -x_5 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___lambda__1(x_1, x_2, x_3, x_4); +x_5 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } -lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; -x_8 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__9(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +x_8 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_1); return x_8; } } -lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_6; -x_6 = l_Lean_Server_FileWorker_handleHover___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_4); -lean_dec(x_3); +uint8_t x_3; lean_object* x_4; +x_3 = l_Lean_Server_FileWorker_handleHover___rarg___lambda__1(x_1, x_2); +lean_dec(x_2); lean_dec(x_1); -return x_6; +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Lean_Server_FileWorker_handleHover___rarg___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_Server_FileWorker_handleHover___rarg___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +return x_8; } } lean_object* l_Lean_Server_FileWorker_handleHover___boxed(lean_object* x_1) { @@ -12229,84 +11859,2476 @@ lean_dec(x_1); return x_2; } } -lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 0) { -uint8_t x_3; -x_3 = !lean_is_exclusive(x_1); -if (x_3 == 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_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +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_Server_FileWorker_handleDefinition_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__1___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; x_4 = lean_ctor_get(x_1, 0); -x_5 = lean_box(0); -x_6 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_6, 0, x_4); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_5); -lean_ctor_set(x_7, 1, x_6); -lean_ctor_set_tag(x_1, 1); -lean_ctor_set(x_1, 0, x_7); -x_8 = lean_task_pure(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_2); +lean_inc(x_4); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; +lean_dec(x_2); +x_5 = lean_apply_1(x_3, x_1); +return x_5; +} +else +{ +lean_object* x_6; +x_6 = lean_ctor_get(x_1, 1); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; +lean_dec(x_4); +lean_dec(x_2); +x_7 = lean_apply_1(x_3, x_1); +return x_7; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +lean_dec(x_3); +lean_dec(x_1); +x_8 = lean_ctor_get(x_4, 0); +lean_inc(x_8); +lean_dec(x_4); +x_9 = lean_ctor_get(x_6, 0); +lean_inc(x_9); +lean_dec(x_6); +x_10 = lean_apply_2(x_2, x_8, x_9); +return x_10; +} +} +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__2___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_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_dec(x_2); +x_4 = lean_apply_1(x_3, x_1); +return x_4; +} +else +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_3); +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_1(x_2, x_5); +return x_6; +} +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__3___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_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_dec(x_2); +x_4 = lean_apply_1(x_3, x_1); +return x_4; +} +else +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +lean_dec(x_3); +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_apply_2(x_2, x_6, x_7); +return x_8; +} +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__4___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__5___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +x_4 = lean_apply_1(x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__5(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__5___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__6___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_3); +x_4 = lean_box(0); +x_5 = lean_apply_1(x_2, x_4); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_2); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_1(x_3, x_6); +return x_7; +} +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__6(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__6___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__7___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = lean_box(0); +x_3 = lean_apply_1(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__7(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__7___rarg), 1, 0); +return x_3; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition_match__7___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Server_FileWorker_handleDefinition_match__7(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +lean_inc(x_1); +x_7 = l_Lean_getConstInfo___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +lean_dec(x_7); +x_9 = lean_st_ref_get(x_5, x_8); +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_11 = lean_ctor_get(x_9, 0); +x_12 = lean_ctor_get(x_9, 1); +x_13 = lean_ctor_get(x_11, 0); +lean_inc(x_13); +lean_dec(x_11); +x_14 = l_Lean_Environment_getModuleIdxFor_x3f(x_13, x_1); +lean_dec(x_1); +lean_dec(x_13); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; +x_15 = lean_box(0); +lean_ctor_set(x_9, 0, x_15); return x_9; } else { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_10 = lean_ctor_get(x_1, 0); -lean_inc(x_10); -lean_dec(x_1); -x_11 = lean_box(0); -x_12 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_12, 0, x_10); -x_13 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_13, 0, x_11); -lean_ctor_set(x_13, 1, x_12); -x_14 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_14, 0, x_13); -x_15 = lean_task_pure(x_14); -x_16 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_16, 0, x_15); -lean_ctor_set(x_16, 1, x_2); -return x_16; -} -} -else +uint8_t x_16; +lean_free_object(x_9); +x_16 = !lean_is_exclusive(x_14); +if (x_16 == 0) { -lean_object* x_17; lean_object* x_18; -x_17 = lean_ctor_get(x_1, 0); -lean_inc(x_17); -lean_dec(x_1); -x_18 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1(x_17, x_2); -if (lean_obj_tag(x_18) == 0) -{ -uint8_t x_19; +lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_17 = lean_ctor_get(x_14, 0); +x_18 = lean_st_ref_get(x_5, x_12); x_19 = !lean_is_exclusive(x_18); if (x_19 == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_20 = lean_ctor_get(x_18, 0); -x_21 = l_ExceptT_lift___rarg___closed__1; -x_22 = l_Task_Priority_default; -x_23 = lean_task_map(x_21, x_20, x_22); -lean_ctor_set(x_18, 0, x_23); +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +lean_dec(x_20); +x_22 = l_Lean_Environment_allImportedModuleNames(x_21); +lean_dec(x_21); +x_23 = l_Lean_instInhabitedName; +x_24 = lean_array_get(x_23, x_22, x_17); +lean_dec(x_17); +lean_dec(x_22); +lean_ctor_set(x_14, 0, x_24); +lean_ctor_set(x_18, 0, x_14); return x_18; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_24 = lean_ctor_get(x_18, 0); +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_25 = lean_ctor_get(x_18, 0); +x_26 = lean_ctor_get(x_18, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_18); +x_27 = lean_ctor_get(x_25, 0); +lean_inc(x_27); +lean_dec(x_25); +x_28 = l_Lean_Environment_allImportedModuleNames(x_27); +lean_dec(x_27); +x_29 = l_Lean_instInhabitedName; +x_30 = lean_array_get(x_29, x_28, x_17); +lean_dec(x_17); +lean_dec(x_28); +lean_ctor_set(x_14, 0, x_30); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_14); +lean_ctor_set(x_31, 1, x_26); +return x_31; +} +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_32 = lean_ctor_get(x_14, 0); +lean_inc(x_32); +lean_dec(x_14); +x_33 = lean_st_ref_get(x_5, x_12); +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_33, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + x_36 = x_33; +} else { + lean_dec_ref(x_33); + x_36 = lean_box(0); +} +x_37 = lean_ctor_get(x_34, 0); +lean_inc(x_37); +lean_dec(x_34); +x_38 = l_Lean_Environment_allImportedModuleNames(x_37); +lean_dec(x_37); +x_39 = l_Lean_instInhabitedName; +x_40 = lean_array_get(x_39, x_38, x_32); +lean_dec(x_32); +lean_dec(x_38); +x_41 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_41, 0, x_40); +if (lean_is_scalar(x_36)) { + x_42 = lean_alloc_ctor(0, 2, 0); +} else { + x_42 = x_36; +} +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_35); +return x_42; +} +} +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_43 = lean_ctor_get(x_9, 0); +x_44 = lean_ctor_get(x_9, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_9); +x_45 = lean_ctor_get(x_43, 0); +lean_inc(x_45); +lean_dec(x_43); +x_46 = l_Lean_Environment_getModuleIdxFor_x3f(x_45, x_1); +lean_dec(x_1); +lean_dec(x_45); +if (lean_obj_tag(x_46) == 0) +{ +lean_object* x_47; lean_object* x_48; +x_47 = lean_box(0); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_44); +return x_48; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_49 = lean_ctor_get(x_46, 0); +lean_inc(x_49); +if (lean_is_exclusive(x_46)) { + lean_ctor_release(x_46, 0); + x_50 = x_46; +} else { + lean_dec_ref(x_46); + x_50 = lean_box(0); +} +x_51 = lean_st_ref_get(x_5, x_44); +x_52 = lean_ctor_get(x_51, 0); +lean_inc(x_52); +x_53 = lean_ctor_get(x_51, 1); +lean_inc(x_53); +if (lean_is_exclusive(x_51)) { + lean_ctor_release(x_51, 0); + lean_ctor_release(x_51, 1); + x_54 = x_51; +} else { + lean_dec_ref(x_51); + x_54 = lean_box(0); +} +x_55 = lean_ctor_get(x_52, 0); +lean_inc(x_55); +lean_dec(x_52); +x_56 = l_Lean_Environment_allImportedModuleNames(x_55); +lean_dec(x_55); +x_57 = l_Lean_instInhabitedName; +x_58 = lean_array_get(x_57, x_56, x_49); +lean_dec(x_49); +lean_dec(x_56); +if (lean_is_scalar(x_50)) { + x_59 = lean_alloc_ctor(1, 1, 0); +} else { + x_59 = x_50; +} +lean_ctor_set(x_59, 0, x_58); +if (lean_is_scalar(x_54)) { + x_60 = lean_alloc_ctor(0, 2, 0); +} else { + x_60 = x_54; +} +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_53); +return x_60; +} +} +} +else +{ +uint8_t x_61; +lean_dec(x_1); +x_61 = !lean_is_exclusive(x_7); +if (x_61 == 0) +{ +return x_7; +} +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_7, 0); +x_63 = lean_ctor_get(x_7, 1); +lean_inc(x_63); +lean_inc(x_62); +lean_dec(x_7); +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_62); +lean_ctor_set(x_64, 1, x_63); +return x_64; +} +} +} +} +lean_object* l_Lean_isRec___at_Lean_Server_FileWorker_handleDefinition___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_st_ref_get(x_5, x_6); +x_8 = !lean_is_exclusive(x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_7, 0); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +lean_dec(x_9); +x_11 = l_Lean_isRecCore(x_10, x_1); +x_12 = lean_box(x_11); +lean_ctor_set(x_7, 0, x_12); +return x_7; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; +x_13 = lean_ctor_get(x_7, 0); +x_14 = lean_ctor_get(x_7, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_7); +x_15 = lean_ctor_get(x_13, 0); +lean_inc(x_15); +lean_dec(x_13); +x_16 = l_Lean_isRecCore(x_15, x_1); +x_17 = lean_box(x_16); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_14); +return x_18; +} +} +} +lean_object* l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_st_ref_get(x_5, x_6); +x_8 = !lean_is_exclusive(x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_7, 0); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +lean_dec(x_9); +x_11 = l_Lean_declRangeExt; +x_12 = l_Lean_MapDeclarationExtension_find_x3f___at_Lean_findDeclarationRangesCore_x3f___spec__1(x_11, x_10, x_1); +lean_dec(x_10); +lean_ctor_set(x_7, 0, x_12); +return x_7; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_13 = lean_ctor_get(x_7, 0); +x_14 = lean_ctor_get(x_7, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_7); +x_15 = lean_ctor_get(x_13, 0); +lean_inc(x_15); +lean_dec(x_13); +x_16 = l_Lean_declRangeExt; +x_17 = l_Lean_MapDeclarationExtension_find_x3f___at_Lean_findDeclarationRangesCore_x3f___spec__1(x_16, x_15, x_1); +lean_dec(x_15); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_14); +return x_18; +} +} +} +lean_object* l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_7 = lean_st_ref_get(x_5, x_6); +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +lean_dec(x_7); +x_10 = lean_ctor_get(x_8, 0); +lean_inc(x_10); +lean_dec(x_8); +lean_inc(x_1); +x_11 = l_Lean_isRec___at_Lean_Server_FileWorker_handleDefinition___spec__3(x_1, x_2, x_3, x_4, x_5, x_9); +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +x_14 = l_Lean_auxRecExt; +x_15 = l_Lean_TagDeclarationExtension_isTagged(x_14, x_10, x_1); +if (x_15 == 0) +{ +lean_object* x_16; uint8_t x_17; +x_16 = l_Lean_noConfusionExt; +x_17 = l_Lean_TagDeclarationExtension_isTagged(x_16, x_10, x_1); +lean_dec(x_10); +if (x_17 == 0) +{ +uint8_t x_18; +x_18 = lean_unbox(x_12); +lean_dec(x_12); +if (x_18 == 0) +{ +lean_object* x_19; +x_19 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__4(x_1, x_2, x_3, x_4, x_5, x_13); +return x_19; +} +else +{ +lean_object* x_20; lean_object* x_21; +x_20 = l_Lean_Name_getPrefix(x_1); +lean_dec(x_1); +x_21 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__4(x_20, x_2, x_3, x_4, x_5, x_13); +return x_21; +} +} +else +{ +lean_object* x_22; lean_object* x_23; +lean_dec(x_12); +x_22 = l_Lean_Name_getPrefix(x_1); +lean_dec(x_1); +x_23 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__4(x_22, x_2, x_3, x_4, x_5, x_13); +return x_23; +} +} +else +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_12); +lean_dec(x_10); +x_24 = l_Lean_Name_getPrefix(x_1); +lean_dec(x_1); +x_25 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__4(x_24, x_2, x_3, x_4, x_5, x_13); +return x_25; +} +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, size_t x_10, size_t x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +_start: +{ +lean_object* x_15; lean_object* x_16; uint8_t x_39; +x_39 = x_11 < x_10; +if (x_39 == 0) +{ +lean_object* x_40; lean_object* x_41; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +x_40 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_40, 0, x_12); +x_41 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_41, 1, x_14); +return x_41; +} +else +{ +lean_object* x_42; uint8_t x_43; +x_42 = lean_array_uget(x_9, x_11); +x_43 = !lean_is_exclusive(x_12); +if (x_43 == 0) +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_12, 1); +x_45 = lean_ctor_get(x_12, 0); +lean_dec(x_45); +lean_inc(x_6); +lean_inc(x_5); +x_46 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_42, x_44, x_13, x_14); +lean_dec(x_42); +if (lean_obj_tag(x_46) == 0) +{ +lean_object* x_47; +x_47 = lean_ctor_get(x_46, 0); +lean_inc(x_47); +if (lean_obj_tag(x_47) == 0) +{ +lean_object* x_48; uint8_t x_49; +lean_free_object(x_12); +x_48 = lean_ctor_get(x_46, 1); +lean_inc(x_48); +lean_dec(x_46); +x_49 = !lean_is_exclusive(x_47); +if (x_49 == 0) +{ +x_15 = x_47; +x_16 = x_48; +goto block_38; +} +else +{ +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_47, 0); +lean_inc(x_50); +lean_dec(x_47); +x_51 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_51, 0, x_50); +x_15 = x_51; +x_16 = x_48; +goto block_38; +} +} +else +{ +uint8_t x_52; +x_52 = !lean_is_exclusive(x_47); +if (x_52 == 0) +{ +lean_object* x_53; +x_53 = lean_ctor_get(x_47, 0); +if (lean_obj_tag(x_53) == 0) +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_54 = lean_ctor_get(x_46, 1); +lean_inc(x_54); +lean_dec(x_46); +x_55 = lean_ctor_get(x_53, 0); +lean_inc(x_55); +x_56 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_56, 0, x_53); +lean_ctor_set(x_12, 1, x_55); +lean_ctor_set(x_12, 0, x_56); +x_57 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_57, 0, x_12); +lean_ctor_set(x_47, 0, x_57); +x_15 = x_47; +x_16 = x_54; +goto block_38; +} +else +{ +lean_object* x_58; uint8_t x_59; +x_58 = lean_ctor_get(x_46, 1); +lean_inc(x_58); +lean_dec(x_46); +x_59 = !lean_is_exclusive(x_53); +if (x_59 == 0) +{ +lean_object* x_60; +x_60 = lean_ctor_get(x_53, 0); +lean_inc(x_8); +lean_ctor_set(x_12, 1, x_60); +lean_ctor_set(x_12, 0, x_8); +lean_ctor_set(x_53, 0, x_12); +x_15 = x_47; +x_16 = x_58; +goto block_38; +} +else +{ +lean_object* x_61; lean_object* x_62; +x_61 = lean_ctor_get(x_53, 0); +lean_inc(x_61); +lean_dec(x_53); +lean_inc(x_8); +lean_ctor_set(x_12, 1, x_61); +lean_ctor_set(x_12, 0, x_8); +x_62 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_62, 0, x_12); +lean_ctor_set(x_47, 0, x_62); +x_15 = x_47; +x_16 = x_58; +goto block_38; +} +} +} +else +{ +lean_object* x_63; +x_63 = lean_ctor_get(x_47, 0); +lean_inc(x_63); +lean_dec(x_47); +if (lean_obj_tag(x_63) == 0) +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_64 = lean_ctor_get(x_46, 1); +lean_inc(x_64); +lean_dec(x_46); +x_65 = lean_ctor_get(x_63, 0); +lean_inc(x_65); +x_66 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_66, 0, x_63); +lean_ctor_set(x_12, 1, x_65); +lean_ctor_set(x_12, 0, x_66); +x_67 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_67, 0, x_12); +x_68 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_68, 0, x_67); +x_15 = x_68; +x_16 = x_64; +goto block_38; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_69 = lean_ctor_get(x_46, 1); +lean_inc(x_69); +lean_dec(x_46); +x_70 = lean_ctor_get(x_63, 0); +lean_inc(x_70); +if (lean_is_exclusive(x_63)) { + lean_ctor_release(x_63, 0); + x_71 = x_63; +} else { + lean_dec_ref(x_63); + x_71 = lean_box(0); +} +lean_inc(x_8); +lean_ctor_set(x_12, 1, x_70); +lean_ctor_set(x_12, 0, x_8); +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 1, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_12); +x_73 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_73, 0, x_72); +x_15 = x_73; +x_16 = x_69; +goto block_38; +} +} +} +} +else +{ +uint8_t x_74; +lean_free_object(x_12); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +x_74 = !lean_is_exclusive(x_46); +if (x_74 == 0) +{ +return x_46; +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_75 = lean_ctor_get(x_46, 0); +x_76 = lean_ctor_get(x_46, 1); +lean_inc(x_76); +lean_inc(x_75); +lean_dec(x_46); +x_77 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_77, 0, x_75); +lean_ctor_set(x_77, 1, x_76); +return x_77; +} +} +} +else +{ +lean_object* x_78; lean_object* x_79; +x_78 = lean_ctor_get(x_12, 1); +lean_inc(x_78); +lean_dec(x_12); +lean_inc(x_6); +lean_inc(x_5); +x_79 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_42, x_78, x_13, x_14); +lean_dec(x_42); +if (lean_obj_tag(x_79) == 0) +{ +lean_object* x_80; +x_80 = lean_ctor_get(x_79, 0); +lean_inc(x_80); +if (lean_obj_tag(x_80) == 0) +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_81 = lean_ctor_get(x_79, 1); +lean_inc(x_81); +lean_dec(x_79); +x_82 = lean_ctor_get(x_80, 0); +lean_inc(x_82); +if (lean_is_exclusive(x_80)) { + lean_ctor_release(x_80, 0); + x_83 = x_80; +} else { + lean_dec_ref(x_80); + x_83 = lean_box(0); +} +if (lean_is_scalar(x_83)) { + x_84 = lean_alloc_ctor(0, 1, 0); +} else { + x_84 = x_83; +} +lean_ctor_set(x_84, 0, x_82); +x_15 = x_84; +x_16 = x_81; +goto block_38; +} +else +{ +lean_object* x_85; lean_object* x_86; +x_85 = lean_ctor_get(x_80, 0); +lean_inc(x_85); +if (lean_is_exclusive(x_80)) { + lean_ctor_release(x_80, 0); + x_86 = x_80; +} else { + lean_dec_ref(x_80); + x_86 = lean_box(0); +} +if (lean_obj_tag(x_85) == 0) +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_87 = lean_ctor_get(x_79, 1); +lean_inc(x_87); +lean_dec(x_79); +x_88 = lean_ctor_get(x_85, 0); +lean_inc(x_88); +x_89 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_89, 0, x_85); +x_90 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_88); +x_91 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_91, 0, x_90); +if (lean_is_scalar(x_86)) { + x_92 = lean_alloc_ctor(1, 1, 0); +} else { + x_92 = x_86; +} +lean_ctor_set(x_92, 0, x_91); +x_15 = x_92; +x_16 = x_87; +goto block_38; +} +else +{ +lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_93 = lean_ctor_get(x_79, 1); +lean_inc(x_93); +lean_dec(x_79); +x_94 = lean_ctor_get(x_85, 0); +lean_inc(x_94); +if (lean_is_exclusive(x_85)) { + lean_ctor_release(x_85, 0); + x_95 = x_85; +} else { + lean_dec_ref(x_85); + x_95 = lean_box(0); +} +lean_inc(x_8); +x_96 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_96, 0, x_8); +lean_ctor_set(x_96, 1, x_94); +if (lean_is_scalar(x_95)) { + x_97 = lean_alloc_ctor(1, 1, 0); +} else { + x_97 = x_95; +} +lean_ctor_set(x_97, 0, x_96); +if (lean_is_scalar(x_86)) { + x_98 = lean_alloc_ctor(1, 1, 0); +} else { + x_98 = x_86; +} +lean_ctor_set(x_98, 0, x_97); +x_15 = x_98; +x_16 = x_93; +goto block_38; +} +} +} +else +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +x_99 = lean_ctor_get(x_79, 0); +lean_inc(x_99); +x_100 = lean_ctor_get(x_79, 1); +lean_inc(x_100); +if (lean_is_exclusive(x_79)) { + lean_ctor_release(x_79, 0); + lean_ctor_release(x_79, 1); + x_101 = x_79; +} else { + lean_dec_ref(x_79); + x_101 = lean_box(0); +} +if (lean_is_scalar(x_101)) { + x_102 = lean_alloc_ctor(1, 2, 0); +} else { + x_102 = x_101; +} +lean_ctor_set(x_102, 0, x_99); +lean_ctor_set(x_102, 1, x_100); +return x_102; +} +} +} +block_38: +{ +if (lean_obj_tag(x_15) == 0) +{ +uint8_t x_17; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +x_17 = !lean_is_exclusive(x_15); +if (x_17 == 0) +{ +lean_object* x_18; +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_15); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_15, 0); +lean_inc(x_19); +lean_dec(x_15); +x_20 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_20, 0, x_19); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_16); +return x_21; +} +} +else +{ +uint8_t x_22; +x_22 = !lean_is_exclusive(x_15); +if (x_22 == 0) +{ +lean_object* x_23; +x_23 = lean_ctor_get(x_15, 0); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +lean_dec(x_23); +lean_ctor_set(x_15, 0, x_24); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_15); +lean_ctor_set(x_25, 1, x_16); +return x_25; +} +else +{ +lean_object* x_26; size_t x_27; size_t x_28; +lean_free_object(x_15); +x_26 = lean_ctor_get(x_23, 0); +lean_inc(x_26); +lean_dec(x_23); +x_27 = 1; +x_28 = x_11 + x_27; +x_11 = x_28; +x_12 = x_26; +x_14 = x_16; +goto _start; +} +} +else +{ +lean_object* x_30; +x_30 = lean_ctor_get(x_15, 0); +lean_inc(x_30); +lean_dec(x_15); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +lean_dec(x_30); +x_32 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_32, 0, x_31); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_16); +return x_33; +} +else +{ +lean_object* x_34; size_t x_35; size_t x_36; +x_34 = lean_ctor_get(x_30, 0); +lean_inc(x_34); +lean_dec(x_30); +x_35 = 1; +x_36 = x_11 + x_35; +x_11 = x_36; +x_12 = x_34; +x_14 = x_16; +goto _start; +} +} +} +} +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_alloc_closure((void*)(l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2___boxed), 6, 1); +lean_closure_set(x_10, 0, x_1); +x_11 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_2, x_3, x_10, x_9); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +lean_dec(x_7); +lean_dec(x_5); +x_13 = !lean_is_exclusive(x_11); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_11, 0); +lean_dec(x_14); +x_15 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_15, 0, x_4); +x_16 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_11, 0, x_16); +return x_11; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_ctor_get(x_11, 1); +lean_inc(x_17); +lean_dec(x_11); +x_18 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_18, 0, x_4); +x_19 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_19, 0, x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_17); +return x_20; +} +} +else +{ +if (lean_obj_tag(x_7) == 0) +{ +uint8_t x_21; +lean_dec(x_12); +lean_dec(x_5); +x_21 = !lean_is_exclusive(x_11); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_11, 0); +lean_dec(x_22); +x_23 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_23, 0, x_4); +x_24 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_11, 0, x_24); +return x_11; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_25 = lean_ctor_get(x_11, 1); +lean_inc(x_25); +lean_dec(x_11); +x_26 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_26, 0, x_4); +x_27 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_27, 0, x_26); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_25); +return x_28; +} +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +lean_dec(x_4); +x_29 = lean_ctor_get(x_11, 1); +lean_inc(x_29); +if (lean_is_exclusive(x_11)) { + lean_ctor_release(x_11, 0); + lean_ctor_release(x_11, 1); + x_30 = x_11; +} else { + lean_dec_ref(x_11); + x_30 = lean_box(0); +} +x_31 = lean_ctor_get(x_12, 0); +lean_inc(x_31); +if (lean_is_exclusive(x_12)) { + lean_ctor_release(x_12, 0); + x_32 = x_12; +} else { + lean_dec_ref(x_12); + x_32 = lean_box(0); +} +x_33 = lean_ctor_get(x_7, 0); +lean_inc(x_33); +if (lean_is_exclusive(x_7)) { + lean_ctor_release(x_7, 0); + x_34 = x_7; +} else { + lean_dec_ref(x_7); + x_34 = lean_box(0); +} +x_35 = l_Lean_Elab_TermInfo_pos_x3f(x_5); +x_36 = l_Lean_Elab_TermInfo_tailPos_x3f(x_5); +x_37 = lean_ctor_get(x_31, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_37, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_37, 1); +lean_inc(x_39); +x_40 = lean_ctor_get(x_37, 2); +lean_inc(x_40); +x_41 = lean_ctor_get(x_37, 3); +lean_inc(x_41); +lean_dec(x_37); +x_42 = lean_ctor_get(x_38, 0); +lean_inc(x_42); +lean_dec(x_38); +x_43 = lean_unsigned_to_nat(1u); +x_44 = lean_nat_sub(x_42, x_43); +lean_dec(x_42); +x_45 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_39); +x_46 = lean_ctor_get(x_40, 0); +lean_inc(x_46); +lean_dec(x_40); +x_47 = lean_nat_sub(x_46, x_43); +lean_dec(x_46); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_41); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_45); +lean_ctor_set(x_49, 1, x_48); +x_50 = lean_ctor_get(x_31, 1); +lean_inc(x_50); +lean_dec(x_31); +x_51 = lean_ctor_get(x_50, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_50, 1); +lean_inc(x_52); +x_53 = lean_ctor_get(x_50, 2); +lean_inc(x_53); +x_54 = lean_ctor_get(x_50, 3); +lean_inc(x_54); +lean_dec(x_50); +x_55 = lean_ctor_get(x_51, 0); +lean_inc(x_55); +lean_dec(x_51); +x_56 = lean_nat_sub(x_55, x_43); +lean_dec(x_55); +x_57 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_57, 0, x_56); +lean_ctor_set(x_57, 1, x_52); +x_58 = lean_ctor_get(x_53, 0); +lean_inc(x_58); +lean_dec(x_53); +x_59 = lean_nat_sub(x_58, x_43); +lean_dec(x_58); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_54); +x_61 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_61, 0, x_57); +lean_ctor_set(x_61, 1, x_60); +if (lean_obj_tag(x_35) == 0) +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; +x_106 = l_instInhabitedNat; +x_107 = l_Option_get_x21___rarg___closed__4; +x_108 = lean_panic_fn(x_106, x_107); +x_62 = x_108; +goto block_105; +} +else +{ +lean_object* x_109; +x_109 = lean_ctor_get(x_35, 0); +lean_inc(x_109); +lean_dec(x_35); +x_62 = x_109; +goto block_105; +} +block_105: +{ +lean_object* x_63; +x_63 = l_Lean_FileMap_utf8PosToLspPos(x_6, x_62); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_64 = l_instInhabitedNat; +x_65 = l_Option_get_x21___rarg___closed__4; +x_66 = lean_panic_fn(x_64, x_65); +x_67 = l_Lean_FileMap_utf8PosToLspPos(x_6, x_66); +x_68 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_68, 0, x_63); +lean_ctor_set(x_68, 1, x_67); +if (lean_is_scalar(x_34)) { + x_69 = lean_alloc_ctor(1, 1, 0); +} else { + x_69 = x_34; +} +lean_ctor_set(x_69, 0, x_68); +x_70 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_70, 0, x_69); +lean_ctor_set(x_70, 1, x_33); +lean_ctor_set(x_70, 2, x_49); +lean_ctor_set(x_70, 3, x_61); +x_71 = l_Lean_mkOptionalNode___closed__2; +x_72 = lean_array_push(x_71, x_70); +if (lean_is_scalar(x_32)) { + x_73 = lean_alloc_ctor(1, 1, 0); +} else { + x_73 = x_32; +} +lean_ctor_set(x_73, 0, x_72); +x_74 = lean_box(0); +x_75 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_75, 0, x_73); +lean_ctor_set(x_75, 1, x_74); +x_76 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_76, 0, x_75); +x_77 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_77, 0, x_76); +if (lean_is_scalar(x_30)) { + x_78 = lean_alloc_ctor(0, 2, 0); +} else { + x_78 = x_30; +} +lean_ctor_set(x_78, 0, x_77); +lean_ctor_set(x_78, 1, x_29); +return x_78; +} +else +{ +uint8_t x_79; +lean_dec(x_32); +x_79 = !lean_is_exclusive(x_36); +if (x_79 == 0) +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_80 = lean_ctor_get(x_36, 0); +x_81 = l_Lean_FileMap_utf8PosToLspPos(x_6, x_80); +x_82 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_82, 0, x_63); +lean_ctor_set(x_82, 1, x_81); +lean_ctor_set(x_36, 0, x_82); +x_83 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_83, 0, x_36); +lean_ctor_set(x_83, 1, x_33); +lean_ctor_set(x_83, 2, x_49); +lean_ctor_set(x_83, 3, x_61); +x_84 = l_Lean_mkOptionalNode___closed__2; +x_85 = lean_array_push(x_84, x_83); +if (lean_is_scalar(x_34)) { + x_86 = lean_alloc_ctor(1, 1, 0); +} else { + x_86 = x_34; +} +lean_ctor_set(x_86, 0, x_85); +x_87 = lean_box(0); +x_88 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_88, 0, x_86); +lean_ctor_set(x_88, 1, x_87); +x_89 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_89, 0, x_88); +x_90 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_90, 0, x_89); +if (lean_is_scalar(x_30)) { + x_91 = lean_alloc_ctor(0, 2, 0); +} else { + x_91 = x_30; +} +lean_ctor_set(x_91, 0, x_90); +lean_ctor_set(x_91, 1, x_29); +return x_91; +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_92 = lean_ctor_get(x_36, 0); +lean_inc(x_92); +lean_dec(x_36); +x_93 = l_Lean_FileMap_utf8PosToLspPos(x_6, x_92); +x_94 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_94, 0, x_63); +lean_ctor_set(x_94, 1, x_93); +x_95 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_95, 0, x_94); +x_96 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_96, 0, x_95); +lean_ctor_set(x_96, 1, x_33); +lean_ctor_set(x_96, 2, x_49); +lean_ctor_set(x_96, 3, x_61); +x_97 = l_Lean_mkOptionalNode___closed__2; +x_98 = lean_array_push(x_97, x_96); +if (lean_is_scalar(x_34)) { + x_99 = lean_alloc_ctor(1, 1, 0); +} else { + x_99 = x_34; +} +lean_ctor_set(x_99, 0, x_98); +x_100 = lean_box(0); +x_101 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_101, 0, x_99); +lean_ctor_set(x_101, 1, x_100); +x_102 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_102, 0, x_101); +x_103 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_103, 0, x_102); +if (lean_is_scalar(x_30)) { + x_104 = lean_alloc_ctor(0, 2, 0); +} else { + x_104 = x_30; +} +lean_ctor_set(x_104, 0, x_103); +lean_ctor_set(x_104, 1, x_29); +return x_104; +} +} +} +} +} +} +else +{ +uint8_t x_110; +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +x_110 = !lean_is_exclusive(x_11); +if (x_110 == 0) +{ +return x_11; +} +else +{ +lean_object* x_111; lean_object* x_112; lean_object* x_113; +x_111 = lean_ctor_get(x_11, 0); +x_112 = lean_ctor_get(x_11, 1); +lean_inc(x_112); +lean_inc(x_111); +lean_dec(x_11); +x_113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_113, 0, x_111); +lean_ctor_set(x_113, 1, x_112); +return x_113; +} +} +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(".lean"); +return x_1; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("file://"); +return x_1; +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, size_t x_9, size_t x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; lean_object* x_38; lean_object* x_39; uint8_t x_67; +x_67 = x_10 < x_9; +if (x_67 == 0) +{ +lean_object* x_68; lean_object* x_69; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_68 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_68, 0, x_11); +x_69 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_69, 0, x_68); +lean_ctor_set(x_69, 1, x_13); +return x_69; +} +else +{ +lean_object* x_70; lean_object* x_71; +lean_dec(x_11); +x_70 = lean_array_uget(x_8, x_10); +lean_inc(x_5); +x_71 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f(x_70, x_5); +if (lean_obj_tag(x_71) == 0) +{ +lean_object* x_72; lean_object* x_73; +lean_inc(x_6); +x_72 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_72, 0, x_6); +x_73 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_73, 0, x_72); +x_38 = x_73; +x_39 = x_13; +goto block_66; +} +else +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_74 = lean_ctor_get(x_71, 0); +lean_inc(x_74); +lean_dec(x_71); +x_75 = lean_ctor_get(x_74, 0); +lean_inc(x_75); +x_76 = lean_ctor_get(x_74, 1); +lean_inc(x_76); +lean_dec(x_74); +x_77 = lean_ctor_get(x_76, 0); +lean_inc(x_77); +x_78 = lean_ctor_get(x_76, 1); +lean_inc(x_78); +lean_inc(x_78); +x_79 = lean_alloc_closure((void*)(l_Lean_Meta_inferType), 6, 1); +lean_closure_set(x_79, 0, x_78); +lean_inc(x_77); +x_80 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_75, x_77, x_79, x_13); +if (lean_obj_tag(x_80) == 0) +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_81 = lean_ctor_get(x_80, 0); +lean_inc(x_81); +x_82 = lean_ctor_get(x_80, 1); +lean_inc(x_82); +lean_dec(x_80); +if (x_1 == 0) +{ +lean_dec(x_81); +x_83 = x_78; +goto block_197; +} +else +{ +lean_dec(x_78); +x_83 = x_81; +goto block_197; +} +block_197: +{ +lean_object* x_84; +x_84 = l_Lean_Expr_constName_x3f(x_83); +lean_dec(x_83); +if (lean_obj_tag(x_84) == 0) +{ +lean_object* x_85; lean_object* x_86; +lean_dec(x_77); +lean_dec(x_76); +lean_dec(x_75); +lean_inc(x_6); +x_85 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_85, 0, x_6); +x_86 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_86, 0, x_85); +x_38 = x_86; +x_39 = x_82; +goto block_66; +} +else +{ +uint8_t x_87; +x_87 = !lean_is_exclusive(x_84); +if (x_87 == 0) +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_88 = lean_ctor_get(x_84, 0); +lean_inc(x_88); +x_89 = lean_alloc_closure((void*)(l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1___boxed), 6, 1); +lean_closure_set(x_89, 0, x_88); +lean_inc(x_77); +x_90 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_75, x_77, x_89, x_82); +if (lean_obj_tag(x_90) == 0) +{ +lean_object* x_91; +x_91 = lean_ctor_get(x_90, 0); +lean_inc(x_91); +if (lean_obj_tag(x_91) == 0) +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; +x_92 = lean_ctor_get(x_90, 1); +lean_inc(x_92); +lean_dec(x_90); +x_93 = lean_ctor_get(x_3, 0); +lean_inc(x_93); +lean_ctor_set(x_84, 0, x_93); +lean_inc(x_6); +x_94 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_88, x_75, x_77, x_6, x_76, x_4, x_84, x_12, x_92); +lean_dec(x_75); +if (lean_obj_tag(x_94) == 0) +{ +lean_object* x_95; lean_object* x_96; +x_95 = lean_ctor_get(x_94, 0); +lean_inc(x_95); +x_96 = lean_ctor_get(x_94, 1); +lean_inc(x_96); +lean_dec(x_94); +x_38 = x_95; +x_39 = x_96; +goto block_66; +} +else +{ +uint8_t x_97; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_97 = !lean_is_exclusive(x_94); +if (x_97 == 0) +{ +return x_94; +} +else +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_94, 0); +x_99 = lean_ctor_get(x_94, 1); +lean_inc(x_99); +lean_inc(x_98); +lean_dec(x_94); +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_98); +lean_ctor_set(x_100, 1, x_99); +return x_100; +} +} +} +else +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; +lean_free_object(x_84); +x_101 = lean_ctor_get(x_90, 1); +lean_inc(x_101); +lean_dec(x_90); +x_102 = lean_ctor_get(x_91, 0); +lean_inc(x_102); +lean_dec(x_91); +x_103 = lean_ctor_get(x_2, 3); +x_104 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__1; +x_105 = l_Lean_SearchPath_findWithExt(x_103, x_104, x_102, x_101); +lean_dec(x_102); +if (lean_obj_tag(x_105) == 0) +{ +lean_object* x_106; +x_106 = lean_ctor_get(x_105, 0); +lean_inc(x_106); +if (lean_obj_tag(x_106) == 0) +{ +lean_object* x_107; lean_object* x_108; lean_object* x_109; +x_107 = lean_ctor_get(x_105, 1); +lean_inc(x_107); +lean_dec(x_105); +x_108 = lean_box(0); +lean_inc(x_6); +x_109 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_88, x_75, x_77, x_6, x_76, x_4, x_108, x_12, x_107); +lean_dec(x_75); +if (lean_obj_tag(x_109) == 0) +{ +lean_object* x_110; lean_object* x_111; +x_110 = lean_ctor_get(x_109, 0); +lean_inc(x_110); +x_111 = lean_ctor_get(x_109, 1); +lean_inc(x_111); +lean_dec(x_109); +x_38 = x_110; +x_39 = x_111; +goto block_66; +} +else +{ +uint8_t x_112; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_112 = !lean_is_exclusive(x_109); +if (x_112 == 0) +{ +return x_109; +} +else +{ +lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_113 = lean_ctor_get(x_109, 0); +x_114 = lean_ctor_get(x_109, 1); +lean_inc(x_114); +lean_inc(x_113); +lean_dec(x_109); +x_115 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_115, 0, x_113); +lean_ctor_set(x_115, 1, x_114); +return x_115; +} +} +} +else +{ +lean_object* x_116; uint8_t x_117; +x_116 = lean_ctor_get(x_105, 1); +lean_inc(x_116); +lean_dec(x_105); +x_117 = !lean_is_exclusive(x_106); +if (x_117 == 0) +{ +lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_118 = lean_ctor_get(x_106, 0); +x_119 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2; +x_120 = lean_string_append(x_119, x_118); +lean_dec(x_118); +lean_ctor_set(x_106, 0, x_120); +lean_inc(x_6); +x_121 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_88, x_75, x_77, x_6, x_76, x_4, x_106, x_12, x_116); +lean_dec(x_75); +if (lean_obj_tag(x_121) == 0) +{ +lean_object* x_122; lean_object* x_123; +x_122 = lean_ctor_get(x_121, 0); +lean_inc(x_122); +x_123 = lean_ctor_get(x_121, 1); +lean_inc(x_123); +lean_dec(x_121); +x_38 = x_122; +x_39 = x_123; +goto block_66; +} +else +{ +uint8_t x_124; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_124 = !lean_is_exclusive(x_121); +if (x_124 == 0) +{ +return x_121; +} +else +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; +x_125 = lean_ctor_get(x_121, 0); +x_126 = lean_ctor_get(x_121, 1); +lean_inc(x_126); +lean_inc(x_125); +lean_dec(x_121); +x_127 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_127, 0, x_125); +lean_ctor_set(x_127, 1, x_126); +return x_127; +} +} +} +else +{ +lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; +x_128 = lean_ctor_get(x_106, 0); +lean_inc(x_128); +lean_dec(x_106); +x_129 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2; +x_130 = lean_string_append(x_129, x_128); +lean_dec(x_128); +x_131 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_131, 0, x_130); +lean_inc(x_6); +x_132 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_88, x_75, x_77, x_6, x_76, x_4, x_131, x_12, x_116); +lean_dec(x_75); +if (lean_obj_tag(x_132) == 0) +{ +lean_object* x_133; lean_object* x_134; +x_133 = lean_ctor_get(x_132, 0); +lean_inc(x_133); +x_134 = lean_ctor_get(x_132, 1); +lean_inc(x_134); +lean_dec(x_132); +x_38 = x_133; +x_39 = x_134; +goto block_66; +} +else +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_135 = lean_ctor_get(x_132, 0); +lean_inc(x_135); +x_136 = lean_ctor_get(x_132, 1); +lean_inc(x_136); +if (lean_is_exclusive(x_132)) { + lean_ctor_release(x_132, 0); + lean_ctor_release(x_132, 1); + x_137 = x_132; +} else { + lean_dec_ref(x_132); + x_137 = lean_box(0); +} +if (lean_is_scalar(x_137)) { + x_138 = lean_alloc_ctor(1, 2, 0); +} else { + x_138 = x_137; +} +lean_ctor_set(x_138, 0, x_135); +lean_ctor_set(x_138, 1, x_136); +return x_138; +} +} +} +} +else +{ +uint8_t x_139; +lean_dec(x_88); +lean_dec(x_77); +lean_dec(x_76); +lean_dec(x_75); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_139 = !lean_is_exclusive(x_105); +if (x_139 == 0) +{ +return x_105; +} +else +{ +lean_object* x_140; lean_object* x_141; lean_object* x_142; +x_140 = lean_ctor_get(x_105, 0); +x_141 = lean_ctor_get(x_105, 1); +lean_inc(x_141); +lean_inc(x_140); +lean_dec(x_105); +x_142 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_142, 0, x_140); +lean_ctor_set(x_142, 1, x_141); +return x_142; +} +} +} +} +else +{ +uint8_t x_143; +lean_free_object(x_84); +lean_dec(x_88); +lean_dec(x_77); +lean_dec(x_76); +lean_dec(x_75); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_143 = !lean_is_exclusive(x_90); +if (x_143 == 0) +{ +return x_90; +} +else +{ +lean_object* x_144; lean_object* x_145; lean_object* x_146; +x_144 = lean_ctor_get(x_90, 0); +x_145 = lean_ctor_get(x_90, 1); +lean_inc(x_145); +lean_inc(x_144); +lean_dec(x_90); +x_146 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_146, 0, x_144); +lean_ctor_set(x_146, 1, x_145); +return x_146; +} +} +} +else +{ +lean_object* x_147; lean_object* x_148; lean_object* x_149; +x_147 = lean_ctor_get(x_84, 0); +lean_inc(x_147); +lean_dec(x_84); +lean_inc(x_147); +x_148 = lean_alloc_closure((void*)(l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1___boxed), 6, 1); +lean_closure_set(x_148, 0, x_147); +lean_inc(x_77); +x_149 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_75, x_77, x_148, x_82); +if (lean_obj_tag(x_149) == 0) +{ +lean_object* x_150; +x_150 = lean_ctor_get(x_149, 0); +lean_inc(x_150); +if (lean_obj_tag(x_150) == 0) +{ +lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; +x_151 = lean_ctor_get(x_149, 1); +lean_inc(x_151); +lean_dec(x_149); +x_152 = lean_ctor_get(x_3, 0); +lean_inc(x_152); +x_153 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_153, 0, x_152); +lean_inc(x_6); +x_154 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_147, x_75, x_77, x_6, x_76, x_4, x_153, x_12, x_151); +lean_dec(x_75); +if (lean_obj_tag(x_154) == 0) +{ +lean_object* x_155; lean_object* x_156; +x_155 = lean_ctor_get(x_154, 0); +lean_inc(x_155); +x_156 = lean_ctor_get(x_154, 1); +lean_inc(x_156); +lean_dec(x_154); +x_38 = x_155; +x_39 = x_156; +goto block_66; +} +else +{ +lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_157 = lean_ctor_get(x_154, 0); +lean_inc(x_157); +x_158 = lean_ctor_get(x_154, 1); +lean_inc(x_158); +if (lean_is_exclusive(x_154)) { + lean_ctor_release(x_154, 0); + lean_ctor_release(x_154, 1); + x_159 = x_154; +} else { + lean_dec_ref(x_154); + x_159 = lean_box(0); +} +if (lean_is_scalar(x_159)) { + x_160 = lean_alloc_ctor(1, 2, 0); +} else { + x_160 = x_159; +} +lean_ctor_set(x_160, 0, x_157); +lean_ctor_set(x_160, 1, x_158); +return x_160; +} +} +else +{ +lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; +x_161 = lean_ctor_get(x_149, 1); +lean_inc(x_161); +lean_dec(x_149); +x_162 = lean_ctor_get(x_150, 0); +lean_inc(x_162); +lean_dec(x_150); +x_163 = lean_ctor_get(x_2, 3); +x_164 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__1; +x_165 = l_Lean_SearchPath_findWithExt(x_163, x_164, x_162, x_161); +lean_dec(x_162); +if (lean_obj_tag(x_165) == 0) +{ +lean_object* x_166; +x_166 = lean_ctor_get(x_165, 0); +lean_inc(x_166); +if (lean_obj_tag(x_166) == 0) +{ +lean_object* x_167; lean_object* x_168; lean_object* x_169; +x_167 = lean_ctor_get(x_165, 1); +lean_inc(x_167); +lean_dec(x_165); +x_168 = lean_box(0); +lean_inc(x_6); +x_169 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_147, x_75, x_77, x_6, x_76, x_4, x_168, x_12, x_167); +lean_dec(x_75); +if (lean_obj_tag(x_169) == 0) +{ +lean_object* x_170; lean_object* x_171; +x_170 = lean_ctor_get(x_169, 0); +lean_inc(x_170); +x_171 = lean_ctor_get(x_169, 1); +lean_inc(x_171); +lean_dec(x_169); +x_38 = x_170; +x_39 = x_171; +goto block_66; +} +else +{ +lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_172 = lean_ctor_get(x_169, 0); +lean_inc(x_172); +x_173 = lean_ctor_get(x_169, 1); +lean_inc(x_173); +if (lean_is_exclusive(x_169)) { + lean_ctor_release(x_169, 0); + lean_ctor_release(x_169, 1); + x_174 = x_169; +} else { + lean_dec_ref(x_169); + x_174 = lean_box(0); +} +if (lean_is_scalar(x_174)) { + x_175 = lean_alloc_ctor(1, 2, 0); +} else { + x_175 = x_174; +} +lean_ctor_set(x_175, 0, x_172); +lean_ctor_set(x_175, 1, x_173); +return x_175; +} +} +else +{ +lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; +x_176 = lean_ctor_get(x_165, 1); +lean_inc(x_176); +lean_dec(x_165); +x_177 = lean_ctor_get(x_166, 0); +lean_inc(x_177); +if (lean_is_exclusive(x_166)) { + lean_ctor_release(x_166, 0); + x_178 = x_166; +} else { + lean_dec_ref(x_166); + x_178 = lean_box(0); +} +x_179 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2; +x_180 = lean_string_append(x_179, x_177); +lean_dec(x_177); +if (lean_is_scalar(x_178)) { + x_181 = lean_alloc_ctor(1, 1, 0); +} else { + x_181 = x_178; +} +lean_ctor_set(x_181, 0, x_180); +lean_inc(x_6); +x_182 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_147, x_75, x_77, x_6, x_76, x_4, x_181, x_12, x_176); +lean_dec(x_75); +if (lean_obj_tag(x_182) == 0) +{ +lean_object* x_183; lean_object* x_184; +x_183 = lean_ctor_get(x_182, 0); +lean_inc(x_183); +x_184 = lean_ctor_get(x_182, 1); +lean_inc(x_184); +lean_dec(x_182); +x_38 = x_183; +x_39 = x_184; +goto block_66; +} +else +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_185 = lean_ctor_get(x_182, 0); +lean_inc(x_185); +x_186 = lean_ctor_get(x_182, 1); +lean_inc(x_186); +if (lean_is_exclusive(x_182)) { + lean_ctor_release(x_182, 0); + lean_ctor_release(x_182, 1); + x_187 = x_182; +} else { + lean_dec_ref(x_182); + x_187 = lean_box(0); +} +if (lean_is_scalar(x_187)) { + x_188 = lean_alloc_ctor(1, 2, 0); +} else { + x_188 = x_187; +} +lean_ctor_set(x_188, 0, x_185); +lean_ctor_set(x_188, 1, x_186); +return x_188; +} +} +} +else +{ +lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; +lean_dec(x_147); +lean_dec(x_77); +lean_dec(x_76); +lean_dec(x_75); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_189 = lean_ctor_get(x_165, 0); +lean_inc(x_189); +x_190 = lean_ctor_get(x_165, 1); +lean_inc(x_190); +if (lean_is_exclusive(x_165)) { + lean_ctor_release(x_165, 0); + lean_ctor_release(x_165, 1); + x_191 = x_165; +} else { + lean_dec_ref(x_165); + x_191 = lean_box(0); +} +if (lean_is_scalar(x_191)) { + x_192 = lean_alloc_ctor(1, 2, 0); +} else { + x_192 = x_191; +} +lean_ctor_set(x_192, 0, x_189); +lean_ctor_set(x_192, 1, x_190); +return x_192; +} +} +} +else +{ +lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; +lean_dec(x_147); +lean_dec(x_77); +lean_dec(x_76); +lean_dec(x_75); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_193 = lean_ctor_get(x_149, 0); +lean_inc(x_193); +x_194 = lean_ctor_get(x_149, 1); +lean_inc(x_194); +if (lean_is_exclusive(x_149)) { + lean_ctor_release(x_149, 0); + lean_ctor_release(x_149, 1); + x_195 = x_149; +} else { + lean_dec_ref(x_149); + x_195 = lean_box(0); +} +if (lean_is_scalar(x_195)) { + x_196 = lean_alloc_ctor(1, 2, 0); +} else { + x_196 = x_195; +} +lean_ctor_set(x_196, 0, x_193); +lean_ctor_set(x_196, 1, x_194); +return x_196; +} +} +} +} +} +else +{ +uint8_t x_198; +lean_dec(x_78); +lean_dec(x_77); +lean_dec(x_76); +lean_dec(x_75); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_198 = !lean_is_exclusive(x_80); +if (x_198 == 0) +{ +return x_80; +} +else +{ +lean_object* x_199; lean_object* x_200; lean_object* x_201; +x_199 = lean_ctor_get(x_80, 0); +x_200 = lean_ctor_get(x_80, 1); +lean_inc(x_200); +lean_inc(x_199); +lean_dec(x_80); +x_201 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_201, 0, x_199); +lean_ctor_set(x_201, 1, x_200); +return x_201; +} +} +} +} +block_37: +{ +if (lean_obj_tag(x_14) == 0) +{ +uint8_t x_16; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_16 = !lean_is_exclusive(x_14); +if (x_16 == 0) +{ +lean_object* x_17; +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_14); +lean_ctor_set(x_17, 1, x_15); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_14, 0); +lean_inc(x_18); +lean_dec(x_14); +x_19 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_19, 0, x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_15); +return x_20; +} +} +else +{ +uint8_t x_21; +x_21 = !lean_is_exclusive(x_14); +if (x_21 == 0) +{ +lean_object* x_22; +x_22 = lean_ctor_get(x_14, 0); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +lean_dec(x_22); +lean_ctor_set(x_14, 0, x_23); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_14); +lean_ctor_set(x_24, 1, x_15); +return x_24; +} +else +{ +lean_object* x_25; size_t x_26; size_t x_27; +lean_free_object(x_14); +x_25 = lean_ctor_get(x_22, 0); +lean_inc(x_25); +lean_dec(x_22); +x_26 = 1; +x_27 = x_10 + x_26; +x_10 = x_27; +x_11 = x_25; +x_13 = x_15; +goto _start; +} +} +else +{ +lean_object* x_29; +x_29 = lean_ctor_get(x_14, 0); +lean_inc(x_29); +lean_dec(x_14); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +lean_dec(x_29); +x_31 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_31, 0, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_15); +return x_32; +} +else +{ +lean_object* x_33; size_t x_34; size_t x_35; +x_33 = lean_ctor_get(x_29, 0); +lean_inc(x_33); +lean_dec(x_29); +x_34 = 1; +x_35 = x_10 + x_34; +x_10 = x_35; +x_11 = x_33; +x_13 = x_15; +goto _start; +} +} +} +} +block_66: +{ +if (lean_obj_tag(x_38) == 0) +{ +uint8_t x_40; +x_40 = !lean_is_exclusive(x_38); +if (x_40 == 0) +{ +x_14 = x_38; +x_15 = x_39; +goto block_37; +} +else +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_38, 0); +lean_inc(x_41); +lean_dec(x_38); +x_42 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_42, 0, x_41); +x_14 = x_42; +x_15 = x_39; +goto block_37; +} +} +else +{ +uint8_t x_43; +x_43 = !lean_is_exclusive(x_38); +if (x_43 == 0) +{ +lean_object* x_44; +x_44 = lean_ctor_get(x_38, 0); +if (lean_obj_tag(x_44) == 0) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_44, 0); +lean_inc(x_45); +x_46 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_46, 0, x_44); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +x_48 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_38, 0, x_48); +x_14 = x_38; +x_15 = x_39; +goto block_37; +} +else +{ +uint8_t x_49; +x_49 = !lean_is_exclusive(x_44); +if (x_49 == 0) +{ +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_44, 0); +lean_inc(x_7); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_7); +lean_ctor_set(x_51, 1, x_50); +lean_ctor_set(x_44, 0, x_51); +x_14 = x_38; +x_15 = x_39; +goto block_37; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_44, 0); +lean_inc(x_52); +lean_dec(x_44); +lean_inc(x_7); +x_53 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_53, 0, x_7); +lean_ctor_set(x_53, 1, x_52); +x_54 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_38, 0, x_54); +x_14 = x_38; +x_15 = x_39; +goto block_37; +} +} +} +else +{ +lean_object* x_55; +x_55 = lean_ctor_get(x_38, 0); +lean_inc(x_55); +lean_dec(x_38); +if (lean_obj_tag(x_55) == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_56 = lean_ctor_get(x_55, 0); +lean_inc(x_56); +x_57 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_57, 0, x_55); +x_58 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_56); +x_59 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_59, 0, x_58); +x_60 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_60, 0, x_59); +x_14 = x_60; +x_15 = x_39; +goto block_37; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_61 = lean_ctor_get(x_55, 0); +lean_inc(x_61); +if (lean_is_exclusive(x_55)) { + lean_ctor_release(x_55, 0); + x_62 = x_55; +} else { + lean_dec_ref(x_55); + x_62 = lean_box(0); +} +lean_inc(x_7); +x_63 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_63, 0, x_7); +lean_ctor_set(x_63, 1, x_61); +if (lean_is_scalar(x_62)) { + x_64 = lean_alloc_ctor(1, 1, 0); +} else { + x_64 = x_62; +} +lean_ctor_set(x_64, 0, x_63); +x_65 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_65, 0, x_64); +x_14 = x_65; +x_15 = x_39; +goto block_37; +} +} +} +} +} +} +lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__6(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; +x_12 = lean_ctor_get(x_8, 0); +x_13 = lean_box(0); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_9); +x_15 = lean_array_get_size(x_12); +x_16 = lean_usize_of_nat(x_15); +lean_dec(x_15); +x_17 = 0; +x_18 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_13, x_12, x_16, x_17, x_14, x_10, x_11); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +if (lean_obj_tag(x_19) == 0) +{ +uint8_t x_20; +x_20 = !lean_is_exclusive(x_18); +if (x_20 == 0) +{ +lean_object* x_21; uint8_t x_22; +x_21 = lean_ctor_get(x_18, 0); +lean_dec(x_21); +x_22 = !lean_is_exclusive(x_19); +if (x_22 == 0) +{ +return x_18; +} +else +{ +lean_object* x_23; lean_object* x_24; +x_23 = lean_ctor_get(x_19, 0); +lean_inc(x_23); +lean_dec(x_19); +x_24 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_18, 0, x_24); +return x_18; +} +} +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_18, 1); lean_inc(x_25); -lean_inc(x_24); lean_dec(x_18); -x_26 = l_ExceptT_lift___rarg___closed__1; -x_27 = l_Task_Priority_default; -x_28 = lean_task_map(x_26, x_24, x_27); +x_26 = lean_ctor_get(x_19, 0); +lean_inc(x_26); +if (lean_is_exclusive(x_19)) { + lean_ctor_release(x_19, 0); + x_27 = x_19; +} else { + lean_dec_ref(x_19); + x_27 = lean_box(0); +} +if (lean_is_scalar(x_27)) { + x_28 = lean_alloc_ctor(0, 1, 0); +} else { + x_28 = x_27; +} +lean_ctor_set(x_28, 0, x_26); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_25); @@ -12316,363 +14338,2328 @@ return x_29; else { uint8_t x_30; -x_30 = !lean_is_exclusive(x_18); +x_30 = !lean_is_exclusive(x_19); if (x_30 == 0) { +lean_object* x_31; lean_object* x_32; +x_31 = lean_ctor_get(x_19, 0); +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +if (lean_obj_tag(x_32) == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_free_object(x_19); +x_33 = lean_ctor_get(x_18, 1); +lean_inc(x_33); +lean_dec(x_18); +x_34 = lean_ctor_get(x_31, 1); +lean_inc(x_34); +lean_dec(x_31); +x_35 = lean_box(0); +x_36 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_34, x_35, x_10, x_33); +return x_36; +} +else +{ +uint8_t x_37; +lean_dec(x_31); +x_37 = !lean_is_exclusive(x_18); +if (x_37 == 0) +{ +lean_object* x_38; lean_object* x_39; +x_38 = lean_ctor_get(x_18, 0); +lean_dec(x_38); +x_39 = lean_ctor_get(x_32, 0); +lean_inc(x_39); +lean_dec(x_32); +lean_ctor_set(x_19, 0, x_39); +return x_18; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_18, 1); +lean_inc(x_40); +lean_dec(x_18); +x_41 = lean_ctor_get(x_32, 0); +lean_inc(x_41); +lean_dec(x_32); +lean_ctor_set(x_19, 0, x_41); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_19); +lean_ctor_set(x_42, 1, x_40); +return x_42; +} +} +} +else +{ +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_19, 0); +lean_inc(x_43); +lean_dec(x_19); +x_44 = lean_ctor_get(x_43, 0); +lean_inc(x_44); +if (lean_obj_tag(x_44) == 0) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_18, 1); +lean_inc(x_45); +lean_dec(x_18); +x_46 = lean_ctor_get(x_43, 1); +lean_inc(x_46); +lean_dec(x_43); +x_47 = lean_box(0); +x_48 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_46, x_47, x_10, x_45); +return x_48; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +lean_dec(x_43); +x_49 = lean_ctor_get(x_18, 1); +lean_inc(x_49); +if (lean_is_exclusive(x_18)) { + lean_ctor_release(x_18, 0); + lean_ctor_release(x_18, 1); + x_50 = x_18; +} else { + lean_dec_ref(x_18); + x_50 = lean_box(0); +} +x_51 = lean_ctor_get(x_44, 0); +lean_inc(x_51); +lean_dec(x_44); +x_52 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_52, 0, x_51); +if (lean_is_scalar(x_50)) { + x_53 = lean_alloc_ctor(0, 2, 0); +} else { + x_53 = x_50; +} +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_49); +return x_53; +} +} +} +} +else +{ +uint8_t x_54; +x_54 = !lean_is_exclusive(x_18); +if (x_54 == 0) +{ return x_18; } else { -lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_18, 0); -x_32 = lean_ctor_get(x_18, 1); -lean_inc(x_32); -lean_inc(x_31); +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_18, 0); +x_56 = lean_ctor_get(x_18, 1); +lean_inc(x_56); +lean_inc(x_55); lean_dec(x_18); -x_33 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -return x_33; +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_55); +lean_ctor_set(x_57, 1, x_56); +return x_57; } } } -} -} -lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2(lean_object* x_1) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_2 = lean_ctor_get(x_1, 0); -x_3 = lean_box(0); -lean_inc(x_2); -x_4 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_4, 0, x_2); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_3); -lean_ctor_set(x_6, 1, x_5); -return x_6; -} else { -lean_object* x_7; -x_7 = lean_ctor_get(x_1, 0); -lean_inc(x_7); -return x_7; -} -} -} -static lean_object* _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1() { -_start: +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; size_t x_62; size_t x_63; lean_object* x_64; +x_58 = lean_ctor_get(x_8, 0); +x_59 = lean_box(0); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_9); +x_61 = lean_array_get_size(x_58); +x_62 = lean_usize_of_nat(x_61); +lean_dec(x_61); +x_63 = 0; +x_64 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8(x_1, x_2, x_3, x_4, x_5, x_6, x_59, x_58, x_62, x_63, x_60, x_10, x_11); +if (lean_obj_tag(x_64) == 0) { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__1), 2, 0); -return x_1; -} -} -static lean_object* _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2() { -_start: +lean_object* x_65; +x_65 = lean_ctor_get(x_64, 0); +lean_inc(x_65); +if (lean_obj_tag(x_65) == 0) { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2___boxed), 1, 0); -return x_1; -} -} -lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1(lean_object* x_1, lean_object* x_2) { -_start: +uint8_t x_66; +x_66 = !lean_is_exclusive(x_64); +if (x_66 == 0) { -switch (lean_obj_tag(x_1)) { -case 0: +lean_object* x_67; uint8_t x_68; +x_67 = lean_ctor_get(x_64, 0); +lean_dec(x_67); +x_68 = !lean_is_exclusive(x_65); +if (x_68 == 0) { -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 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1(x_4, x_2); -if (lean_obj_tag(x_5) == 0) -{ -uint8_t x_6; -x_6 = !lean_is_exclusive(x_5); -if (x_6 == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_7 = lean_ctor_get(x_5, 0); -x_8 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___rarg___lambda__1), 2, 1); -lean_closure_set(x_8, 0, x_3); -x_9 = l_Task_Priority_default; -x_10 = lean_task_map(x_8, x_7, x_9); -lean_ctor_set(x_5, 0, x_10); -return x_5; +return x_64; } else { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_11 = lean_ctor_get(x_5, 0); -x_12 = lean_ctor_get(x_5, 1); -lean_inc(x_12); -lean_inc(x_11); +lean_object* x_69; lean_object* x_70; +x_69 = lean_ctor_get(x_65, 0); +lean_inc(x_69); +lean_dec(x_65); +x_70 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_70, 0, x_69); +lean_ctor_set(x_64, 0, x_70); +return x_64; +} +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_71 = lean_ctor_get(x_64, 1); +lean_inc(x_71); +lean_dec(x_64); +x_72 = lean_ctor_get(x_65, 0); +lean_inc(x_72); +if (lean_is_exclusive(x_65)) { + lean_ctor_release(x_65, 0); + x_73 = x_65; +} else { + lean_dec_ref(x_65); + x_73 = lean_box(0); +} +if (lean_is_scalar(x_73)) { + x_74 = lean_alloc_ctor(0, 1, 0); +} else { + x_74 = x_73; +} +lean_ctor_set(x_74, 0, x_72); +x_75 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_71); +return x_75; +} +} +else +{ +uint8_t x_76; +x_76 = !lean_is_exclusive(x_65); +if (x_76 == 0) +{ +lean_object* x_77; lean_object* x_78; +x_77 = lean_ctor_get(x_65, 0); +x_78 = lean_ctor_get(x_77, 0); +lean_inc(x_78); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +lean_free_object(x_65); +x_79 = lean_ctor_get(x_64, 1); +lean_inc(x_79); +lean_dec(x_64); +x_80 = lean_ctor_get(x_77, 1); +lean_inc(x_80); +lean_dec(x_77); +x_81 = lean_box(0); +x_82 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_80, x_81, x_10, x_79); +return x_82; +} +else +{ +uint8_t x_83; +lean_dec(x_77); +x_83 = !lean_is_exclusive(x_64); +if (x_83 == 0) +{ +lean_object* x_84; lean_object* x_85; +x_84 = lean_ctor_get(x_64, 0); +lean_dec(x_84); +x_85 = lean_ctor_get(x_78, 0); +lean_inc(x_85); +lean_dec(x_78); +lean_ctor_set(x_65, 0, x_85); +return x_64; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_64, 1); +lean_inc(x_86); +lean_dec(x_64); +x_87 = lean_ctor_get(x_78, 0); +lean_inc(x_87); +lean_dec(x_78); +lean_ctor_set(x_65, 0, x_87); +x_88 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_88, 0, x_65); +lean_ctor_set(x_88, 1, x_86); +return x_88; +} +} +} +else +{ +lean_object* x_89; lean_object* x_90; +x_89 = lean_ctor_get(x_65, 0); +lean_inc(x_89); +lean_dec(x_65); +x_90 = lean_ctor_get(x_89, 0); +lean_inc(x_90); +if (lean_obj_tag(x_90) == 0) +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; +x_91 = lean_ctor_get(x_64, 1); +lean_inc(x_91); +lean_dec(x_64); +x_92 = lean_ctor_get(x_89, 1); +lean_inc(x_92); +lean_dec(x_89); +x_93 = lean_box(0); +x_94 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___lambda__1(x_92, x_93, x_10, x_91); +return x_94; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; +lean_dec(x_89); +x_95 = lean_ctor_get(x_64, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_96 = x_64; +} else { + lean_dec_ref(x_64); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_90, 0); +lean_inc(x_97); +lean_dec(x_90); +x_98 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_98, 0, x_97); +if (lean_is_scalar(x_96)) { + x_99 = lean_alloc_ctor(0, 2, 0); +} else { + x_99 = x_96; +} +lean_ctor_set(x_99, 0, x_98); +lean_ctor_set(x_99, 1, x_95); +return x_99; +} +} +} +} +else +{ +uint8_t x_100; +x_100 = !lean_is_exclusive(x_64); +if (x_100 == 0) +{ +return x_64; +} +else +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_101 = lean_ctor_get(x_64, 0); +x_102 = lean_ctor_get(x_64, 1); +lean_inc(x_102); +lean_inc(x_101); +lean_dec(x_64); +x_103 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_103, 0, x_101); +lean_ctor_set(x_103, 1, x_102); +return x_103; +} +} +} +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__9(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, size_t x_9, size_t x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; lean_object* x_38; lean_object* x_39; uint8_t x_72; +x_72 = x_10 < x_9; +if (x_72 == 0) +{ +lean_object* x_73; lean_object* x_74; +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); -x_13 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___rarg___lambda__1), 2, 1); -lean_closure_set(x_13, 0, x_3); -x_14 = l_Task_Priority_default; -x_15 = lean_task_map(x_13, x_11, x_14); -x_16 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_16, 0, x_15); -lean_ctor_set(x_16, 1, x_12); -return x_16; +x_73 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_73, 0, x_11); +x_74 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_74, 0, x_73); +lean_ctor_set(x_74, 1, x_13); +return x_74; +} +else +{ +lean_object* x_75; lean_object* x_76; +lean_dec(x_11); +x_75 = lean_array_uget(x_8, x_10); +lean_inc(x_5); +x_76 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f(x_75, x_5); +if (lean_obj_tag(x_76) == 0) +{ +lean_object* x_77; lean_object* x_78; +lean_inc(x_6); +x_77 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_77, 0, x_6); +x_78 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_78, 0, x_77); +x_38 = x_78; +x_39 = x_13; +goto block_71; +} +else +{ +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_79 = lean_ctor_get(x_76, 0); +lean_inc(x_79); +lean_dec(x_76); +x_80 = lean_ctor_get(x_79, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_79, 1); +lean_inc(x_81); +lean_dec(x_79); +x_82 = lean_ctor_get(x_81, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_81, 1); +lean_inc(x_83); +lean_inc(x_83); +x_84 = lean_alloc_closure((void*)(l_Lean_Meta_inferType), 6, 1); +lean_closure_set(x_84, 0, x_83); +lean_inc(x_82); +x_85 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_80, x_82, x_84, x_13); +if (lean_obj_tag(x_85) == 0) +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_85, 0); +lean_inc(x_86); +x_87 = lean_ctor_get(x_85, 1); +lean_inc(x_87); +lean_dec(x_85); +if (x_1 == 0) +{ +lean_dec(x_86); +x_88 = x_83; +goto block_202; +} +else +{ +lean_dec(x_83); +x_88 = x_86; +goto block_202; +} +block_202: +{ +lean_object* x_89; +x_89 = l_Lean_Expr_constName_x3f(x_88); +lean_dec(x_88); +if (lean_obj_tag(x_89) == 0) +{ +lean_object* x_90; lean_object* x_91; +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_80); +lean_inc(x_6); +x_90 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_90, 0, x_6); +x_91 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_91, 0, x_90); +x_38 = x_91; +x_39 = x_87; +goto block_71; +} +else +{ +uint8_t x_92; +x_92 = !lean_is_exclusive(x_89); +if (x_92 == 0) +{ +lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_93 = lean_ctor_get(x_89, 0); +lean_inc(x_93); +x_94 = lean_alloc_closure((void*)(l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1___boxed), 6, 1); +lean_closure_set(x_94, 0, x_93); +lean_inc(x_82); +x_95 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_80, x_82, x_94, x_87); +if (lean_obj_tag(x_95) == 0) +{ +lean_object* x_96; +x_96 = lean_ctor_get(x_95, 0); +lean_inc(x_96); +if (lean_obj_tag(x_96) == 0) +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_97 = lean_ctor_get(x_95, 1); +lean_inc(x_97); +lean_dec(x_95); +x_98 = lean_ctor_get(x_3, 0); +lean_inc(x_98); +lean_ctor_set(x_89, 0, x_98); +lean_inc(x_6); +x_99 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_93, x_80, x_82, x_6, x_81, x_4, x_89, x_12, x_97); +lean_dec(x_80); +if (lean_obj_tag(x_99) == 0) +{ +lean_object* x_100; lean_object* x_101; +x_100 = lean_ctor_get(x_99, 0); +lean_inc(x_100); +x_101 = lean_ctor_get(x_99, 1); +lean_inc(x_101); +lean_dec(x_99); +x_38 = x_100; +x_39 = x_101; +goto block_71; +} +else +{ +uint8_t x_102; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_102 = !lean_is_exclusive(x_99); +if (x_102 == 0) +{ +return x_99; +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_103 = lean_ctor_get(x_99, 0); +x_104 = lean_ctor_get(x_99, 1); +lean_inc(x_104); +lean_inc(x_103); +lean_dec(x_99); +x_105 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_105, 0, x_103); +lean_ctor_set(x_105, 1, x_104); +return x_105; +} } } else { -uint8_t x_17; -lean_dec(x_3); -x_17 = !lean_is_exclusive(x_5); -if (x_17 == 0) +lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; +lean_free_object(x_89); +x_106 = lean_ctor_get(x_95, 1); +lean_inc(x_106); +lean_dec(x_95); +x_107 = lean_ctor_get(x_96, 0); +lean_inc(x_107); +lean_dec(x_96); +x_108 = lean_ctor_get(x_2, 3); +x_109 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__1; +x_110 = l_Lean_SearchPath_findWithExt(x_108, x_109, x_107, x_106); +lean_dec(x_107); +if (lean_obj_tag(x_110) == 0) { -return x_5; +lean_object* x_111; +x_111 = lean_ctor_get(x_110, 0); +lean_inc(x_111); +if (lean_obj_tag(x_111) == 0) +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_112 = lean_ctor_get(x_110, 1); +lean_inc(x_112); +lean_dec(x_110); +x_113 = lean_box(0); +lean_inc(x_6); +x_114 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_93, x_80, x_82, x_6, x_81, x_4, x_113, x_12, x_112); +lean_dec(x_80); +if (lean_obj_tag(x_114) == 0) +{ +lean_object* x_115; lean_object* x_116; +x_115 = lean_ctor_get(x_114, 0); +lean_inc(x_115); +x_116 = lean_ctor_get(x_114, 1); +lean_inc(x_116); +lean_dec(x_114); +x_38 = x_115; +x_39 = x_116; +goto block_71; +} +else +{ +uint8_t x_117; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_117 = !lean_is_exclusive(x_114); +if (x_117 == 0) +{ +return x_114; +} +else +{ +lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_118 = lean_ctor_get(x_114, 0); +x_119 = lean_ctor_get(x_114, 1); +lean_inc(x_119); +lean_inc(x_118); +lean_dec(x_114); +x_120 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_120, 0, x_118); +lean_ctor_set(x_120, 1, x_119); +return x_120; +} +} +} +else +{ +lean_object* x_121; uint8_t x_122; +x_121 = lean_ctor_get(x_110, 1); +lean_inc(x_121); +lean_dec(x_110); +x_122 = !lean_is_exclusive(x_111); +if (x_122 == 0) +{ +lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; +x_123 = lean_ctor_get(x_111, 0); +x_124 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2; +x_125 = lean_string_append(x_124, x_123); +lean_dec(x_123); +lean_ctor_set(x_111, 0, x_125); +lean_inc(x_6); +x_126 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_93, x_80, x_82, x_6, x_81, x_4, x_111, x_12, x_121); +lean_dec(x_80); +if (lean_obj_tag(x_126) == 0) +{ +lean_object* x_127; lean_object* x_128; +x_127 = lean_ctor_get(x_126, 0); +lean_inc(x_127); +x_128 = lean_ctor_get(x_126, 1); +lean_inc(x_128); +lean_dec(x_126); +x_38 = x_127; +x_39 = x_128; +goto block_71; +} +else +{ +uint8_t x_129; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_129 = !lean_is_exclusive(x_126); +if (x_129 == 0) +{ +return x_126; +} +else +{ +lean_object* x_130; lean_object* x_131; lean_object* x_132; +x_130 = lean_ctor_get(x_126, 0); +x_131 = lean_ctor_get(x_126, 1); +lean_inc(x_131); +lean_inc(x_130); +lean_dec(x_126); +x_132 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_132, 0, x_130); +lean_ctor_set(x_132, 1, x_131); +return x_132; +} +} +} +else +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +x_133 = lean_ctor_get(x_111, 0); +lean_inc(x_133); +lean_dec(x_111); +x_134 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2; +x_135 = lean_string_append(x_134, x_133); +lean_dec(x_133); +x_136 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_136, 0, x_135); +lean_inc(x_6); +x_137 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_93, x_80, x_82, x_6, x_81, x_4, x_136, x_12, x_121); +lean_dec(x_80); +if (lean_obj_tag(x_137) == 0) +{ +lean_object* x_138; lean_object* x_139; +x_138 = lean_ctor_get(x_137, 0); +lean_inc(x_138); +x_139 = lean_ctor_get(x_137, 1); +lean_inc(x_139); +lean_dec(x_137); +x_38 = x_138; +x_39 = x_139; +goto block_71; +} +else +{ +lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_140 = lean_ctor_get(x_137, 0); +lean_inc(x_140); +x_141 = lean_ctor_get(x_137, 1); +lean_inc(x_141); +if (lean_is_exclusive(x_137)) { + lean_ctor_release(x_137, 0); + lean_ctor_release(x_137, 1); + x_142 = x_137; +} else { + lean_dec_ref(x_137); + x_142 = lean_box(0); +} +if (lean_is_scalar(x_142)) { + x_143 = lean_alloc_ctor(1, 2, 0); +} else { + x_143 = x_142; +} +lean_ctor_set(x_143, 0, x_140); +lean_ctor_set(x_143, 1, x_141); +return x_143; +} +} +} +} +else +{ +uint8_t x_144; +lean_dec(x_93); +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_80); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_144 = !lean_is_exclusive(x_110); +if (x_144 == 0) +{ +return x_110; +} +else +{ +lean_object* x_145; lean_object* x_146; lean_object* x_147; +x_145 = lean_ctor_get(x_110, 0); +x_146 = lean_ctor_get(x_110, 1); +lean_inc(x_146); +lean_inc(x_145); +lean_dec(x_110); +x_147 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_147, 0, x_145); +lean_ctor_set(x_147, 1, x_146); +return x_147; +} +} +} +} +else +{ +uint8_t x_148; +lean_free_object(x_89); +lean_dec(x_93); +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_80); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_148 = !lean_is_exclusive(x_95); +if (x_148 == 0) +{ +return x_95; +} +else +{ +lean_object* x_149; lean_object* x_150; lean_object* x_151; +x_149 = lean_ctor_get(x_95, 0); +x_150 = lean_ctor_get(x_95, 1); +lean_inc(x_150); +lean_inc(x_149); +lean_dec(x_95); +x_151 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_151, 0, x_149); +lean_ctor_set(x_151, 1, x_150); +return x_151; +} +} +} +else +{ +lean_object* x_152; lean_object* x_153; lean_object* x_154; +x_152 = lean_ctor_get(x_89, 0); +lean_inc(x_152); +lean_dec(x_89); +lean_inc(x_152); +x_153 = lean_alloc_closure((void*)(l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1___boxed), 6, 1); +lean_closure_set(x_153, 0, x_152); +lean_inc(x_82); +x_154 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_80, x_82, x_153, x_87); +if (lean_obj_tag(x_154) == 0) +{ +lean_object* x_155; +x_155 = lean_ctor_get(x_154, 0); +lean_inc(x_155); +if (lean_obj_tag(x_155) == 0) +{ +lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; +x_156 = lean_ctor_get(x_154, 1); +lean_inc(x_156); +lean_dec(x_154); +x_157 = lean_ctor_get(x_3, 0); +lean_inc(x_157); +x_158 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_158, 0, x_157); +lean_inc(x_6); +x_159 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_152, x_80, x_82, x_6, x_81, x_4, x_158, x_12, x_156); +lean_dec(x_80); +if (lean_obj_tag(x_159) == 0) +{ +lean_object* x_160; lean_object* x_161; +x_160 = lean_ctor_get(x_159, 0); +lean_inc(x_160); +x_161 = lean_ctor_get(x_159, 1); +lean_inc(x_161); +lean_dec(x_159); +x_38 = x_160; +x_39 = x_161; +goto block_71; +} +else +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_162 = lean_ctor_get(x_159, 0); +lean_inc(x_162); +x_163 = lean_ctor_get(x_159, 1); +lean_inc(x_163); +if (lean_is_exclusive(x_159)) { + lean_ctor_release(x_159, 0); + lean_ctor_release(x_159, 1); + x_164 = x_159; +} else { + lean_dec_ref(x_159); + x_164 = lean_box(0); +} +if (lean_is_scalar(x_164)) { + x_165 = lean_alloc_ctor(1, 2, 0); +} else { + x_165 = x_164; +} +lean_ctor_set(x_165, 0, x_162); +lean_ctor_set(x_165, 1, x_163); +return x_165; +} +} +else +{ +lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; +x_166 = lean_ctor_get(x_154, 1); +lean_inc(x_166); +lean_dec(x_154); +x_167 = lean_ctor_get(x_155, 0); +lean_inc(x_167); +lean_dec(x_155); +x_168 = lean_ctor_get(x_2, 3); +x_169 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__1; +x_170 = l_Lean_SearchPath_findWithExt(x_168, x_169, x_167, x_166); +lean_dec(x_167); +if (lean_obj_tag(x_170) == 0) +{ +lean_object* x_171; +x_171 = lean_ctor_get(x_170, 0); +lean_inc(x_171); +if (lean_obj_tag(x_171) == 0) +{ +lean_object* x_172; lean_object* x_173; lean_object* x_174; +x_172 = lean_ctor_get(x_170, 1); +lean_inc(x_172); +lean_dec(x_170); +x_173 = lean_box(0); +lean_inc(x_6); +x_174 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_152, x_80, x_82, x_6, x_81, x_4, x_173, x_12, x_172); +lean_dec(x_80); +if (lean_obj_tag(x_174) == 0) +{ +lean_object* x_175; lean_object* x_176; +x_175 = lean_ctor_get(x_174, 0); +lean_inc(x_175); +x_176 = lean_ctor_get(x_174, 1); +lean_inc(x_176); +lean_dec(x_174); +x_38 = x_175; +x_39 = x_176; +goto block_71; +} +else +{ +lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_177 = lean_ctor_get(x_174, 0); +lean_inc(x_177); +x_178 = lean_ctor_get(x_174, 1); +lean_inc(x_178); +if (lean_is_exclusive(x_174)) { + lean_ctor_release(x_174, 0); + lean_ctor_release(x_174, 1); + x_179 = x_174; +} else { + lean_dec_ref(x_174); + x_179 = lean_box(0); +} +if (lean_is_scalar(x_179)) { + x_180 = lean_alloc_ctor(1, 2, 0); +} else { + x_180 = x_179; +} +lean_ctor_set(x_180, 0, x_177); +lean_ctor_set(x_180, 1, x_178); +return x_180; +} +} +else +{ +lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; +x_181 = lean_ctor_get(x_170, 1); +lean_inc(x_181); +lean_dec(x_170); +x_182 = lean_ctor_get(x_171, 0); +lean_inc(x_182); +if (lean_is_exclusive(x_171)) { + lean_ctor_release(x_171, 0); + x_183 = x_171; +} else { + lean_dec_ref(x_171); + x_183 = lean_box(0); +} +x_184 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2; +x_185 = lean_string_append(x_184, x_182); +lean_dec(x_182); +if (lean_is_scalar(x_183)) { + x_186 = lean_alloc_ctor(1, 1, 0); +} else { + x_186 = x_183; +} +lean_ctor_set(x_186, 0, x_185); +lean_inc(x_6); +x_187 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1(x_152, x_80, x_82, x_6, x_81, x_4, x_186, x_12, x_181); +lean_dec(x_80); +if (lean_obj_tag(x_187) == 0) +{ +lean_object* x_188; lean_object* x_189; +x_188 = lean_ctor_get(x_187, 0); +lean_inc(x_188); +x_189 = lean_ctor_get(x_187, 1); +lean_inc(x_189); +lean_dec(x_187); +x_38 = x_188; +x_39 = x_189; +goto block_71; +} +else +{ +lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_190 = lean_ctor_get(x_187, 0); +lean_inc(x_190); +x_191 = lean_ctor_get(x_187, 1); +lean_inc(x_191); +if (lean_is_exclusive(x_187)) { + lean_ctor_release(x_187, 0); + lean_ctor_release(x_187, 1); + x_192 = x_187; +} else { + lean_dec_ref(x_187); + x_192 = lean_box(0); +} +if (lean_is_scalar(x_192)) { + x_193 = lean_alloc_ctor(1, 2, 0); +} else { + x_193 = x_192; +} +lean_ctor_set(x_193, 0, x_190); +lean_ctor_set(x_193, 1, x_191); +return x_193; +} +} +} +else +{ +lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; +lean_dec(x_152); +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_80); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_194 = lean_ctor_get(x_170, 0); +lean_inc(x_194); +x_195 = lean_ctor_get(x_170, 1); +lean_inc(x_195); +if (lean_is_exclusive(x_170)) { + lean_ctor_release(x_170, 0); + lean_ctor_release(x_170, 1); + x_196 = x_170; +} else { + lean_dec_ref(x_170); + x_196 = lean_box(0); +} +if (lean_is_scalar(x_196)) { + x_197 = lean_alloc_ctor(1, 2, 0); +} else { + x_197 = x_196; +} +lean_ctor_set(x_197, 0, x_194); +lean_ctor_set(x_197, 1, x_195); +return x_197; +} +} +} +else +{ +lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; +lean_dec(x_152); +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_80); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_198 = lean_ctor_get(x_154, 0); +lean_inc(x_198); +x_199 = lean_ctor_get(x_154, 1); +lean_inc(x_199); +if (lean_is_exclusive(x_154)) { + lean_ctor_release(x_154, 0); + lean_ctor_release(x_154, 1); + x_200 = x_154; +} else { + lean_dec_ref(x_154); + x_200 = lean_box(0); +} +if (lean_is_scalar(x_200)) { + x_201 = lean_alloc_ctor(1, 2, 0); +} else { + x_201 = x_200; +} +lean_ctor_set(x_201, 0, x_198); +lean_ctor_set(x_201, 1, x_199); +return x_201; +} +} +} +} +} +else +{ +uint8_t x_203; +lean_dec(x_83); +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_80); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_203 = !lean_is_exclusive(x_85); +if (x_203 == 0) +{ +return x_85; +} +else +{ +lean_object* x_204; lean_object* x_205; lean_object* x_206; +x_204 = lean_ctor_get(x_85, 0); +x_205 = lean_ctor_get(x_85, 1); +lean_inc(x_205); +lean_inc(x_204); +lean_dec(x_85); +x_206 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_206, 0, x_204); +lean_ctor_set(x_206, 1, x_205); +return x_206; +} +} +} +} +block_37: +{ +if (lean_obj_tag(x_14) == 0) +{ +uint8_t x_16; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_16 = !lean_is_exclusive(x_14); +if (x_16 == 0) +{ +lean_object* x_17; +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_14); +lean_ctor_set(x_17, 1, x_15); +return x_17; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_18 = lean_ctor_get(x_5, 0); -x_19 = lean_ctor_get(x_5, 1); -lean_inc(x_19); +x_18 = lean_ctor_get(x_14, 0); lean_inc(x_18); -lean_dec(x_5); -x_20 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_20, 0, x_18); -lean_ctor_set(x_20, 1, x_19); +lean_dec(x_14); +x_19 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_19, 0, x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_15); return x_20; } } -} -case 1: -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_21 = lean_ctor_get(x_1, 0); -lean_inc(x_21); -lean_dec(x_1); -x_22 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1; -x_23 = l_Task_Priority_default; -x_24 = lean_io_bind_task(x_21, x_22, x_23, x_2); -if (lean_obj_tag(x_24) == 0) -{ -uint8_t x_25; -x_25 = !lean_is_exclusive(x_24); -if (x_25 == 0) -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_24, 0); -x_27 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2; -x_28 = lean_task_map(x_27, x_26, x_23); -lean_ctor_set(x_24, 0, x_28); -return x_24; -} else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_29 = lean_ctor_get(x_24, 0); -x_30 = lean_ctor_get(x_24, 1); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_24); -x_31 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2; -x_32 = lean_task_map(x_31, x_29, x_23); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_30); -return x_33; -} -} -else +uint8_t x_21; +x_21 = !lean_is_exclusive(x_14); +if (x_21 == 0) { -uint8_t x_34; -x_34 = !lean_is_exclusive(x_24); -if (x_34 == 0) +lean_object* x_22; +x_22 = lean_ctor_get(x_14, 0); +if (lean_obj_tag(x_22) == 0) { -return x_24; -} -else -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_24, 0); -x_36 = lean_ctor_get(x_24, 1); -lean_inc(x_36); -lean_inc(x_35); -lean_dec(x_24); -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; -} -} -} -default: -{ -lean_object* x_38; lean_object* x_39; -x_38 = l_IO_AsyncList_waitAll___rarg___closed__1; -x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_2); -return x_39; -} -} -} -} -static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_box(0); -x_2 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1; -x_2 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2; -return x_2; -} -} -static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___boxed), 1, 0); -return x_1; -} -} -lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_3 = lean_ctor_get(x_1, 3); -x_4 = lean_st_ref_get(x_3, x_2); -x_5 = lean_ctor_get(x_4, 0); -lean_inc(x_5); -x_6 = lean_ctor_get(x_4, 1); -lean_inc(x_6); -lean_dec(x_4); -x_7 = lean_ctor_get(x_5, 2); -lean_inc(x_7); +lean_object* x_23; lean_object* x_24; +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); -x_8 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1(x_7, x_6); -if (lean_obj_tag(x_8) == 0) -{ -uint8_t x_9; -x_9 = !lean_is_exclusive(x_8); -if (x_9 == 0) -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_10 = lean_ctor_get(x_8, 0); -x_11 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1; -x_12 = l_Task_Priority_default; -x_13 = lean_task_map(x_11, x_10, x_12); -lean_ctor_set(x_8, 0, x_13); -return x_8; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +lean_dec(x_22); +lean_ctor_set(x_14, 0, x_23); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_14); +lean_ctor_set(x_24, 1, x_15); +return x_24; } else { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_14 = lean_ctor_get(x_8, 0); -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_inc(x_14); +lean_object* x_25; size_t x_26; size_t x_27; +lean_free_object(x_14); +x_25 = lean_ctor_get(x_22, 0); +lean_inc(x_25); +lean_dec(x_22); +x_26 = 1; +x_27 = x_10 + x_26; +x_10 = x_27; +x_11 = x_25; +x_13 = x_15; +goto _start; +} +} +else +{ +lean_object* x_29; +x_29 = lean_ctor_get(x_14, 0); +lean_inc(x_29); +lean_dec(x_14); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +lean_dec(x_29); +x_31 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_31, 0, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_15); +return x_32; +} +else +{ +lean_object* x_33; size_t x_34; size_t x_35; +x_33 = lean_ctor_get(x_29, 0); +lean_inc(x_33); +lean_dec(x_29); +x_34 = 1; +x_35 = x_10 + x_34; +x_10 = x_35; +x_11 = x_33; +x_13 = x_15; +goto _start; +} +} +} +} +block_71: +{ +if (lean_obj_tag(x_38) == 0) +{ +uint8_t x_40; +x_40 = !lean_is_exclusive(x_38); +if (x_40 == 0) +{ +x_14 = x_38; +x_15 = x_39; +goto block_37; +} +else +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_38, 0); +lean_inc(x_41); +lean_dec(x_38); +x_42 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_42, 0, x_41); +x_14 = x_42; +x_15 = x_39; +goto block_37; +} +} +else +{ +uint8_t x_43; +x_43 = !lean_is_exclusive(x_38); +if (x_43 == 0) +{ +lean_object* x_44; +x_44 = lean_ctor_get(x_38, 0); +if (lean_obj_tag(x_44) == 0) +{ +uint8_t x_45; +x_45 = !lean_is_exclusive(x_44); +if (x_45 == 0) +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_44, 0); +lean_inc(x_46); +x_47 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_47, 0, x_46); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_46); +lean_ctor_set(x_44, 0, x_48); +x_14 = x_38; +x_15 = x_39; +goto block_37; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_49 = lean_ctor_get(x_44, 0); +lean_inc(x_49); +lean_dec(x_44); +lean_inc(x_49); +x_50 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_50, 0, x_49); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_49); +x_52 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_38, 0, x_52); +x_14 = x_38; +x_15 = x_39; +goto block_37; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_44); +if (x_53 == 0) +{ +lean_object* x_54; lean_object* x_55; +x_54 = lean_ctor_get(x_44, 0); +lean_inc(x_7); +x_55 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_55, 0, x_7); +lean_ctor_set(x_55, 1, x_54); +lean_ctor_set(x_44, 0, x_55); +x_14 = x_38; +x_15 = x_39; +goto block_37; +} +else +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_44, 0); +lean_inc(x_56); +lean_dec(x_44); +lean_inc(x_7); +x_57 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_57, 0, x_7); +lean_ctor_set(x_57, 1, x_56); +x_58 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_38, 0, x_58); +x_14 = x_38; +x_15 = x_39; +goto block_37; +} +} +} +else +{ +lean_object* x_59; +x_59 = lean_ctor_get(x_38, 0); +lean_inc(x_59); +lean_dec(x_38); +if (lean_obj_tag(x_59) == 0) +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_60 = lean_ctor_get(x_59, 0); +lean_inc(x_60); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + x_61 = x_59; +} else { + lean_dec_ref(x_59); + x_61 = lean_box(0); +} +lean_inc(x_60); +x_62 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_62, 0, x_60); +x_63 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_60); +if (lean_is_scalar(x_61)) { + x_64 = lean_alloc_ctor(0, 1, 0); +} else { + x_64 = x_61; +} +lean_ctor_set(x_64, 0, x_63); +x_65 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_65, 0, x_64); +x_14 = x_65; +x_15 = x_39; +goto block_37; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_66 = lean_ctor_get(x_59, 0); +lean_inc(x_66); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + x_67 = x_59; +} else { + lean_dec_ref(x_59); + x_67 = lean_box(0); +} +lean_inc(x_7); +x_68 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_68, 0, x_7); +lean_ctor_set(x_68, 1, x_66); +if (lean_is_scalar(x_67)) { + x_69 = lean_alloc_ctor(1, 1, 0); +} else { + x_69 = x_67; +} +lean_ctor_set(x_69, 0, x_68); +x_70 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_70, 0, x_69); +x_14 = x_70; +x_15 = x_39; +goto block_37; +} +} +} +} +} +} +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__5(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +lean_inc(x_6); +lean_inc(x_5); +x_12 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__6(x_1, x_2, x_3, x_4, x_5, x_6, x_8, x_11, x_8, x_9, x_10); lean_dec(x_8); -x_16 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1; -x_17 = l_Task_Priority_default; -x_18 = lean_task_map(x_16, x_14, x_17); -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_18); -lean_ctor_set(x_19, 1, x_15); -return x_19; +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +if (lean_obj_tag(x_13) == 0) +{ +uint8_t x_14; +lean_dec(x_6); +lean_dec(x_5); +x_14 = !lean_is_exclusive(x_12); +if (x_14 == 0) +{ +lean_object* x_15; uint8_t x_16; +x_15 = lean_ctor_get(x_12, 0); +lean_dec(x_15); +x_16 = !lean_is_exclusive(x_13); +if (x_16 == 0) +{ +return x_12; +} +else +{ +lean_object* x_17; lean_object* x_18; +x_17 = lean_ctor_get(x_13, 0); +lean_inc(x_17); +lean_dec(x_13); +x_18 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_12, 0, x_18); +return x_12; } } else { -uint8_t x_20; -x_20 = !lean_is_exclusive(x_8); -if (x_20 == 0) -{ -return x_8; +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_19 = lean_ctor_get(x_12, 1); +lean_inc(x_19); +lean_dec(x_12); +x_20 = lean_ctor_get(x_13, 0); +lean_inc(x_20); +if (lean_is_exclusive(x_13)) { + lean_ctor_release(x_13, 0); + x_21 = x_13; +} else { + lean_dec_ref(x_13); + x_21 = lean_box(0); } -else -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_8, 0); -x_22 = lean_ctor_get(x_8, 1); -lean_inc(x_22); -lean_inc(x_21); -lean_dec(x_8); -x_23 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_23, 0, x_21); -lean_ctor_set(x_23, 1, x_22); +if (lean_is_scalar(x_21)) { + x_22 = lean_alloc_ctor(0, 1, 0); +} else { + x_22 = x_21; +} +lean_ctor_set(x_22, 0, x_20); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_19); return x_23; } } +else +{ +uint8_t x_24; +x_24 = !lean_is_exclusive(x_13); +if (x_24 == 0) +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_13, 0); +if (lean_obj_tag(x_25) == 0) +{ +uint8_t x_26; +lean_dec(x_6); +lean_dec(x_5); +x_26 = !lean_is_exclusive(x_12); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_12, 0); +lean_dec(x_27); +x_28 = lean_ctor_get(x_25, 0); +lean_inc(x_28); +lean_dec(x_25); +lean_ctor_set(x_13, 0, x_28); +return x_12; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_12, 1); +lean_inc(x_29); +lean_dec(x_12); +x_30 = lean_ctor_get(x_25, 0); +lean_inc(x_30); +lean_dec(x_25); +lean_ctor_set(x_13, 0, x_30); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_13); +lean_ctor_set(x_31, 1, x_29); +return x_31; } } -lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics(lean_object* x_1, lean_object* x_2) { +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; size_t x_38; size_t x_39; lean_object* x_40; +lean_free_object(x_13); +x_32 = lean_ctor_get(x_12, 1); +lean_inc(x_32); +lean_dec(x_12); +x_33 = lean_ctor_get(x_25, 0); +lean_inc(x_33); +lean_dec(x_25); +x_34 = lean_ctor_get(x_7, 1); +x_35 = lean_box(0); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_33); +x_37 = lean_array_get_size(x_34); +x_38 = lean_usize_of_nat(x_37); +lean_dec(x_37); +x_39 = 0; +x_40 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__9(x_1, x_2, x_3, x_4, x_5, x_6, x_35, x_34, x_38, x_39, x_36, x_9, x_32); +if (lean_obj_tag(x_40) == 0) +{ +lean_object* x_41; +x_41 = lean_ctor_get(x_40, 0); +lean_inc(x_41); +if (lean_obj_tag(x_41) == 0) +{ +uint8_t x_42; +x_42 = !lean_is_exclusive(x_40); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_40, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_41); +if (x_44 == 0) +{ +return x_40; +} +else +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_41, 0); +lean_inc(x_45); +lean_dec(x_41); +x_46 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_40, 0, x_46); +return x_40; +} +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_47 = lean_ctor_get(x_40, 1); +lean_inc(x_47); +lean_dec(x_40); +x_48 = lean_ctor_get(x_41, 0); +lean_inc(x_48); +if (lean_is_exclusive(x_41)) { + lean_ctor_release(x_41, 0); + x_49 = x_41; +} else { + lean_dec_ref(x_41); + x_49 = lean_box(0); +} +if (lean_is_scalar(x_49)) { + x_50 = lean_alloc_ctor(0, 1, 0); +} else { + x_50 = x_49; +} +lean_ctor_set(x_50, 0, x_48); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_47); +return x_51; +} +} +else +{ +uint8_t x_52; +x_52 = !lean_is_exclusive(x_41); +if (x_52 == 0) +{ +lean_object* x_53; lean_object* x_54; +x_53 = lean_ctor_get(x_41, 0); +x_54 = lean_ctor_get(x_53, 0); +lean_inc(x_54); +if (lean_obj_tag(x_54) == 0) +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +lean_free_object(x_41); +x_55 = lean_ctor_get(x_40, 1); +lean_inc(x_55); +lean_dec(x_40); +x_56 = lean_ctor_get(x_53, 1); +lean_inc(x_56); +lean_dec(x_53); +x_57 = lean_box(0); +x_58 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1(x_56, x_57, x_9, x_55); +return x_58; +} +else +{ +uint8_t x_59; +lean_dec(x_53); +x_59 = !lean_is_exclusive(x_40); +if (x_59 == 0) +{ +lean_object* x_60; lean_object* x_61; +x_60 = lean_ctor_get(x_40, 0); +lean_dec(x_60); +x_61 = lean_ctor_get(x_54, 0); +lean_inc(x_61); +lean_dec(x_54); +lean_ctor_set(x_41, 0, x_61); +return x_40; +} +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_40, 1); +lean_inc(x_62); +lean_dec(x_40); +x_63 = lean_ctor_get(x_54, 0); +lean_inc(x_63); +lean_dec(x_54); +lean_ctor_set(x_41, 0, x_63); +x_64 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_64, 0, x_41); +lean_ctor_set(x_64, 1, x_62); +return x_64; +} +} +} +else +{ +lean_object* x_65; lean_object* x_66; +x_65 = lean_ctor_get(x_41, 0); +lean_inc(x_65); +lean_dec(x_41); +x_66 = lean_ctor_get(x_65, 0); +lean_inc(x_66); +if (lean_obj_tag(x_66) == 0) +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_67 = lean_ctor_get(x_40, 1); +lean_inc(x_67); +lean_dec(x_40); +x_68 = lean_ctor_get(x_65, 1); +lean_inc(x_68); +lean_dec(x_65); +x_69 = lean_box(0); +x_70 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1(x_68, x_69, x_9, x_67); +return x_70; +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +lean_dec(x_65); +x_71 = lean_ctor_get(x_40, 1); +lean_inc(x_71); +if (lean_is_exclusive(x_40)) { + lean_ctor_release(x_40, 0); + lean_ctor_release(x_40, 1); + x_72 = x_40; +} else { + lean_dec_ref(x_40); + x_72 = lean_box(0); +} +x_73 = lean_ctor_get(x_66, 0); +lean_inc(x_73); +lean_dec(x_66); +x_74 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_74, 0, x_73); +if (lean_is_scalar(x_72)) { + x_75 = lean_alloc_ctor(0, 2, 0); +} else { + x_75 = x_72; +} +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_71); +return x_75; +} +} +} +} +else +{ +uint8_t x_76; +x_76 = !lean_is_exclusive(x_40); +if (x_76 == 0) +{ +return x_40; +} +else +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_40, 0); +x_78 = lean_ctor_get(x_40, 1); +lean_inc(x_78); +lean_inc(x_77); +lean_dec(x_40); +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +return x_79; +} +} +} +} +else +{ +lean_object* x_80; +x_80 = lean_ctor_get(x_13, 0); +lean_inc(x_80); +lean_dec(x_13); +if (lean_obj_tag(x_80) == 0) +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; +lean_dec(x_6); +lean_dec(x_5); +x_81 = lean_ctor_get(x_12, 1); +lean_inc(x_81); +if (lean_is_exclusive(x_12)) { + lean_ctor_release(x_12, 0); + lean_ctor_release(x_12, 1); + x_82 = x_12; +} else { + lean_dec_ref(x_12); + x_82 = lean_box(0); +} +x_83 = lean_ctor_get(x_80, 0); +lean_inc(x_83); +lean_dec(x_80); +x_84 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_84, 0, x_83); +if (lean_is_scalar(x_82)) { + x_85 = lean_alloc_ctor(0, 2, 0); +} else { + x_85 = x_82; +} +lean_ctor_set(x_85, 0, x_84); +lean_ctor_set(x_85, 1, x_81); +return x_85; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; size_t x_92; size_t x_93; lean_object* x_94; +x_86 = lean_ctor_get(x_12, 1); +lean_inc(x_86); +lean_dec(x_12); +x_87 = lean_ctor_get(x_80, 0); +lean_inc(x_87); +lean_dec(x_80); +x_88 = lean_ctor_get(x_7, 1); +x_89 = lean_box(0); +x_90 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_87); +x_91 = lean_array_get_size(x_88); +x_92 = lean_usize_of_nat(x_91); +lean_dec(x_91); +x_93 = 0; +x_94 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__9(x_1, x_2, x_3, x_4, x_5, x_6, x_89, x_88, x_92, x_93, x_90, x_9, x_86); +if (lean_obj_tag(x_94) == 0) +{ +lean_object* x_95; +x_95 = lean_ctor_get(x_94, 0); +lean_inc(x_95); +if (lean_obj_tag(x_95) == 0) +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_96 = lean_ctor_get(x_94, 1); +lean_inc(x_96); +if (lean_is_exclusive(x_94)) { + lean_ctor_release(x_94, 0); + lean_ctor_release(x_94, 1); + x_97 = x_94; +} else { + lean_dec_ref(x_94); + x_97 = lean_box(0); +} +x_98 = lean_ctor_get(x_95, 0); +lean_inc(x_98); +if (lean_is_exclusive(x_95)) { + lean_ctor_release(x_95, 0); + x_99 = x_95; +} else { + lean_dec_ref(x_95); + x_99 = lean_box(0); +} +if (lean_is_scalar(x_99)) { + x_100 = lean_alloc_ctor(0, 1, 0); +} else { + x_100 = x_99; +} +lean_ctor_set(x_100, 0, x_98); +if (lean_is_scalar(x_97)) { + x_101 = lean_alloc_ctor(0, 2, 0); +} else { + x_101 = x_97; +} +lean_ctor_set(x_101, 0, x_100); +lean_ctor_set(x_101, 1, x_96); +return x_101; +} +else +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_102 = lean_ctor_get(x_95, 0); +lean_inc(x_102); +if (lean_is_exclusive(x_95)) { + lean_ctor_release(x_95, 0); + x_103 = x_95; +} else { + lean_dec_ref(x_95); + x_103 = lean_box(0); +} +x_104 = lean_ctor_get(x_102, 0); +lean_inc(x_104); +if (lean_obj_tag(x_104) == 0) +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; +lean_dec(x_103); +x_105 = lean_ctor_get(x_94, 1); +lean_inc(x_105); +lean_dec(x_94); +x_106 = lean_ctor_get(x_102, 1); +lean_inc(x_106); +lean_dec(x_102); +x_107 = lean_box(0); +x_108 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__3___lambda__1(x_106, x_107, x_9, x_105); +return x_108; +} +else +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; +lean_dec(x_102); +x_109 = lean_ctor_get(x_94, 1); +lean_inc(x_109); +if (lean_is_exclusive(x_94)) { + lean_ctor_release(x_94, 0); + lean_ctor_release(x_94, 1); + x_110 = x_94; +} else { + lean_dec_ref(x_94); + x_110 = lean_box(0); +} +x_111 = lean_ctor_get(x_104, 0); +lean_inc(x_111); +lean_dec(x_104); +if (lean_is_scalar(x_103)) { + x_112 = lean_alloc_ctor(1, 1, 0); +} else { + x_112 = x_103; +} +lean_ctor_set(x_112, 0, x_111); +if (lean_is_scalar(x_110)) { + x_113 = lean_alloc_ctor(0, 2, 0); +} else { + x_113 = x_110; +} +lean_ctor_set(x_113, 0, x_112); +lean_ctor_set(x_113, 1, x_109); +return x_113; +} +} +} +else +{ +lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; +x_114 = lean_ctor_get(x_94, 0); +lean_inc(x_114); +x_115 = lean_ctor_get(x_94, 1); +lean_inc(x_115); +if (lean_is_exclusive(x_94)) { + lean_ctor_release(x_94, 0); + lean_ctor_release(x_94, 1); + x_116 = x_94; +} else { + lean_dec_ref(x_94); + x_116 = lean_box(0); +} +if (lean_is_scalar(x_116)) { + x_117 = lean_alloc_ctor(1, 2, 0); +} else { + x_117 = x_116; +} +lean_ctor_set(x_117, 0, x_114); +lean_ctor_set(x_117, 1, x_115); +return x_117; +} +} +} +} +} +else +{ +uint8_t x_118; +lean_dec(x_6); +lean_dec(x_5); +x_118 = !lean_is_exclusive(x_12); +if (x_118 == 0) +{ +return x_12; +} +else +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_119 = lean_ctor_get(x_12, 0); +x_120 = lean_ctor_get(x_12, 1); +lean_inc(x_120); +lean_inc(x_119); +lean_dec(x_12); +x_121 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_121, 0, x_119); +lean_ctor_set(x_121, 1, x_120); +return x_121; +} +} +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition___lambda__1(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___boxed), 2, 0); -return x_3; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_10 = l_Lean_Server_Snapshots_Snapshot_toCmdState(x_7); +x_11 = lean_ctor_get(x_10, 7); +lean_inc(x_11); +lean_dec(x_10); +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +x_13 = l_Array_findSomeM_x3f___rarg___closed__1; +x_14 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__5(x_1, x_2, x_3, x_4, x_5, x_13, x_12, x_13, x_8, x_9); +lean_dec(x_12); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +if (lean_obj_tag(x_15) == 0) +{ +uint8_t x_16; +lean_dec(x_6); +x_16 = !lean_is_exclusive(x_14); +if (x_16 == 0) +{ +lean_object* x_17; uint8_t x_18; +x_17 = lean_ctor_get(x_14, 0); +lean_dec(x_17); +x_18 = !lean_is_exclusive(x_15); +if (x_18 == 0) +{ +return x_14; +} +else +{ +lean_object* x_19; lean_object* x_20; +x_19 = lean_ctor_get(x_15, 0); +lean_inc(x_19); +lean_dec(x_15); +x_20 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_14, 0, x_20); +return x_14; } } -lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2___boxed(lean_object* x_1) { +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_21 = lean_ctor_get(x_14, 1); +lean_inc(x_21); +lean_dec(x_14); +x_22 = lean_ctor_get(x_15, 0); +lean_inc(x_22); +if (lean_is_exclusive(x_15)) { + lean_ctor_release(x_15, 0); + x_23 = x_15; +} else { + lean_dec_ref(x_15); + x_23 = lean_box(0); +} +if (lean_is_scalar(x_23)) { + x_24 = lean_alloc_ctor(0, 1, 0); +} else { + x_24 = x_23; +} +lean_ctor_set(x_24, 0, x_22); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_21); +return x_25; +} +} +else +{ +uint8_t x_26; +x_26 = !lean_is_exclusive(x_15); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_15, 0); +x_28 = lean_ctor_get(x_27, 0); +lean_inc(x_28); +lean_dec(x_27); +if (lean_obj_tag(x_28) == 0) +{ +uint8_t x_29; +lean_free_object(x_15); +x_29 = !lean_is_exclusive(x_14); +if (x_29 == 0) +{ +lean_object* x_30; +x_30 = lean_ctor_get(x_14, 0); +lean_dec(x_30); +lean_ctor_set(x_14, 0, x_6); +return x_14; +} +else +{ +lean_object* x_31; lean_object* x_32; +x_31 = lean_ctor_get(x_14, 1); +lean_inc(x_31); +lean_dec(x_14); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_6); +lean_ctor_set(x_32, 1, x_31); +return x_32; +} +} +else +{ +uint8_t x_33; +lean_dec(x_6); +x_33 = !lean_is_exclusive(x_14); +if (x_33 == 0) +{ +lean_object* x_34; lean_object* x_35; +x_34 = lean_ctor_get(x_14, 0); +lean_dec(x_34); +x_35 = lean_ctor_get(x_28, 0); +lean_inc(x_35); +lean_dec(x_28); +lean_ctor_set(x_15, 0, x_35); +return x_14; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_14, 1); +lean_inc(x_36); +lean_dec(x_14); +x_37 = lean_ctor_get(x_28, 0); +lean_inc(x_37); +lean_dec(x_28); +lean_ctor_set(x_15, 0, x_37); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_15); +lean_ctor_set(x_38, 1, x_36); +return x_38; +} +} +} +else +{ +lean_object* x_39; lean_object* x_40; +x_39 = lean_ctor_get(x_15, 0); +lean_inc(x_39); +lean_dec(x_15); +x_40 = lean_ctor_get(x_39, 0); +lean_inc(x_40); +lean_dec(x_39); +if (lean_obj_tag(x_40) == 0) +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_14, 1); +lean_inc(x_41); +if (lean_is_exclusive(x_14)) { + lean_ctor_release(x_14, 0); + lean_ctor_release(x_14, 1); + x_42 = x_14; +} else { + lean_dec_ref(x_14); + x_42 = lean_box(0); +} +if (lean_is_scalar(x_42)) { + x_43 = lean_alloc_ctor(0, 2, 0); +} else { + x_43 = x_42; +} +lean_ctor_set(x_43, 0, x_6); +lean_ctor_set(x_43, 1, x_41); +return x_43; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +lean_dec(x_6); +x_44 = lean_ctor_get(x_14, 1); +lean_inc(x_44); +if (lean_is_exclusive(x_14)) { + lean_ctor_release(x_14, 0); + lean_ctor_release(x_14, 1); + x_45 = x_14; +} else { + lean_dec_ref(x_14); + x_45 = lean_box(0); +} +x_46 = lean_ctor_get(x_40, 0); +lean_inc(x_46); +lean_dec(x_40); +x_47 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_47, 0, x_46); +if (lean_is_scalar(x_45)) { + x_48 = lean_alloc_ctor(0, 2, 0); +} else { + x_48 = x_45; +} +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_44); +return x_48; +} +} +} +} +else +{ +uint8_t x_49; +lean_dec(x_6); +x_49 = !lean_is_exclusive(x_14); +if (x_49 == 0) +{ +return x_14; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_14, 0); +x_51 = lean_ctor_get(x_14, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_14); +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; +} +} +} +} +static lean_object* _init_l_Lean_Server_FileWorker_handleDefinition___closed__1() { _start: { -lean_object* x_2; -x_2 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2(x_1); -lean_dec(x_1); +lean_object* x_1; lean_object* x_2; +x_1 = l_Array_empty___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___boxed(lean_object* x_1) { +static lean_object* _init_l_Lean_Server_FileWorker_handleDefinition___closed__2() { _start: { -lean_object* x_2; -x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1(x_1); -lean_dec(x_1); +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Server_FileWorker_handleDefinition___closed__1; +x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Server_FileWorker_handleHover___spec__1___rarg___boxed), 3, 1); +lean_closure_set(x_2, 0, x_1); return x_2; } } -lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Server_FileWorker_handleDefinition(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -lean_object* x_3; -x_3 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg(x_1, x_2); -lean_dec(x_1); -return x_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; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_6 = lean_ctor_get(x_4, 4); +lean_inc(x_6); +x_7 = lean_st_ref_get(x_6, x_5); +lean_dec(x_6); +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +lean_dec(x_7); +x_10 = lean_ctor_get(x_8, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_10, 2); +lean_inc(x_11); +x_12 = lean_ctor_get(x_3, 1); +lean_inc(x_12); +lean_dec(x_3); +x_13 = l_Lean_FileMap_lspPosToUtf8Pos(x_11, x_12); +lean_inc(x_13); +x_14 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___boxed), 2, 1); +lean_closure_set(x_14, 0, x_13); +x_15 = l_Lean_Server_FileWorker_handleDefinition___closed__1; +x_16 = lean_box(x_1); +lean_inc(x_4); +x_17 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition___lambda__1___boxed), 9, 6); +lean_closure_set(x_17, 0, x_16); +lean_closure_set(x_17, 1, x_4); +lean_closure_set(x_17, 2, x_10); +lean_closure_set(x_17, 3, x_11); +lean_closure_set(x_17, 4, x_13); +lean_closure_set(x_17, 5, x_15); +x_18 = l_Lean_Server_FileWorker_handleDefinition___closed__2; +x_19 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg(x_8, x_14, x_18, x_17, x_4, x_9); +return x_19; } } -lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { -lean_object* x_3; -x_3 = l_Lean_Server_FileWorker_handleWaitForDiagnostics(x_1, x_2); +lean_object* x_7; +x_7 = l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); +return x_7; +} +} +lean_object* l_Lean_isRec___at_Lean_Server_FileWorker_handleDefinition___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_isRec___at_Lean_Server_FileWorker_handleDefinition___spec__3(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__4(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* 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) { +_start: +{ +uint8_t x_15; size_t x_16; size_t x_17; lean_object* x_18; +x_15 = lean_unbox(x_1); lean_dec(x_1); -return x_3; +x_16 = lean_unbox_usize(x_10); +lean_dec(x_10); +x_17 = lean_unbox_usize(x_11); +lean_dec(x_11); +x_18 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7(x_15, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_16, x_17, x_12, x_13, x_14); +lean_dec(x_13); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_18; +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; +x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___lambda__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_6); +lean_dec(x_2); +return x_10; +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +uint8_t x_14; size_t x_15; size_t x_16; lean_object* x_17; +x_14 = lean_unbox(x_1); +lean_dec(x_1); +x_15 = lean_unbox_usize(x_9); +lean_dec(x_9); +x_16 = lean_unbox_usize(x_10); +lean_dec(x_10); +x_17 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8(x_14, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_15, x_16, x_11, x_12, x_13); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_17; +} +} +lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +uint8_t x_12; lean_object* x_13; +x_12 = lean_unbox(x_1); +lean_dec(x_1); +x_13 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__6(x_12, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_13; +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__9___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +uint8_t x_14; size_t x_15; size_t x_16; lean_object* x_17; +x_14 = lean_unbox(x_1); +lean_dec(x_1); +x_15 = lean_unbox_usize(x_9); +lean_dec(x_9); +x_16 = lean_unbox_usize(x_10); +lean_dec(x_10); +x_17 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__9(x_14, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_15, x_16, x_11, x_12, x_13); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_17; +} +} +lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +uint8_t x_11; lean_object* x_12; +x_11 = lean_unbox(x_1); +lean_dec(x_1); +x_12 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__5(x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_12; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +uint8_t x_10; lean_object* x_11; +x_10 = lean_unbox(x_1); +lean_dec(x_1); +x_11 = l_Lean_Server_FileWorker_handleDefinition___lambda__1(x_10, 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_4); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +lean_object* l_Lean_Server_FileWorker_handleDefinition___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; lean_object* x_7; +x_6 = lean_unbox(x_1); +lean_dec(x_1); +x_7 = l_Lean_Server_FileWorker_handleDefinition(x_6, x_2, x_3, x_4, x_5); +lean_dec(x_2); +return x_7; } } lean_object* l_Lean_Server_FileWorker_rangeOfSyntax(lean_object* x_1, lean_object* x_2) { @@ -16431,7 +20418,7 @@ if (lean_obj_tag(x_24) == 0) lean_object* x_25; lean_dec(x_11); lean_dec(x_1); -x_25 = l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___closed__1; +x_25 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1; lean_ctor_set(x_4, 0, x_25); return x_4; } @@ -16504,7 +20491,7 @@ if (lean_obj_tag(x_46) == 0) lean_object* x_47; lean_object* x_48; lean_dec(x_33); lean_dec(x_1); -x_47 = l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___closed__1; +x_47 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1; x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_29); @@ -16559,7 +20546,7 @@ lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg(lean_object* x _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_3 = lean_ctor_get(x_1, 3); +x_3 = lean_ctor_get(x_1, 4); lean_inc(x_3); lean_dec(x_1); x_4 = lean_alloc_closure((void*)(l_IO_FS_Stream_ofBuffer___lambda__1___boxed), 2, 1); @@ -16601,6 +20588,452 @@ lean_dec(x_1); return x_3; } } +lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_6, 0, x_4); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_5); +lean_ctor_set(x_7, 1, x_6); +lean_ctor_set_tag(x_1, 1); +lean_ctor_set(x_1, 0, x_7); +x_8 = lean_task_pure(x_1); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_2); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_10 = lean_ctor_get(x_1, 0); +lean_inc(x_10); +lean_dec(x_1); +x_11 = lean_box(0); +x_12 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_12, 0, x_10); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_11); +lean_ctor_set(x_13, 1, x_12); +x_14 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_14, 0, x_13); +x_15 = lean_task_pure(x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_2); +return x_16; +} +} +else +{ +lean_object* x_17; lean_object* x_18; +x_17 = lean_ctor_get(x_1, 0); +lean_inc(x_17); +lean_dec(x_1); +x_18 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1(x_17, x_2); +if (lean_obj_tag(x_18) == 0) +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_18); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_18, 0); +x_21 = l_ExceptT_lift___rarg___closed__1; +x_22 = l_Task_Priority_default; +x_23 = lean_task_map(x_21, x_20, x_22); +lean_ctor_set(x_18, 0, x_23); +return x_18; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_24 = lean_ctor_get(x_18, 0); +x_25 = lean_ctor_get(x_18, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_18); +x_26 = l_ExceptT_lift___rarg___closed__1; +x_27 = l_Task_Priority_default; +x_28 = lean_task_map(x_26, x_24, x_27); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_25); +return x_29; +} +} +else +{ +uint8_t x_30; +x_30 = !lean_is_exclusive(x_18); +if (x_30 == 0) +{ +return x_18; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_18, 0); +x_32 = lean_ctor_get(x_18, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_18); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +} +} +lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_2 = lean_ctor_get(x_1, 0); +x_3 = lean_box(0); +lean_inc(x_2); +x_4 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_4, 0, x_2); +x_5 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_5, 0, x_4); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_3); +lean_ctor_set(x_6, 1, x_5); +return x_6; +} +else +{ +lean_object* x_7; +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +return x_7; +} +} +} +static lean_object* _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__1), 2, 0); +return x_1; +} +} +static lean_object* _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2___boxed), 1, 0); +return x_1; +} +} +lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 0: +{ +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 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1(x_4, x_2); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___rarg___lambda__1), 2, 1); +lean_closure_set(x_8, 0, x_3); +x_9 = l_Task_Priority_default; +x_10 = lean_task_map(x_8, x_7, x_9); +lean_ctor_set(x_5, 0, x_10); +return x_5; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_11 = lean_ctor_get(x_5, 0); +x_12 = lean_ctor_get(x_5, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_5); +x_13 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___rarg___lambda__1), 2, 1); +lean_closure_set(x_13, 0, x_3); +x_14 = l_Task_Priority_default; +x_15 = lean_task_map(x_13, x_11, x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_12); +return x_16; +} +} +else +{ +uint8_t x_17; +lean_dec(x_3); +x_17 = !lean_is_exclusive(x_5); +if (x_17 == 0) +{ +return x_5; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_5, 0); +x_19 = lean_ctor_get(x_5, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_5); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +case 1: +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_21 = lean_ctor_get(x_1, 0); +lean_inc(x_21); +lean_dec(x_1); +x_22 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1; +x_23 = l_Task_Priority_default; +x_24 = lean_io_bind_task(x_21, x_22, x_23, x_2); +if (lean_obj_tag(x_24) == 0) +{ +uint8_t x_25; +x_25 = !lean_is_exclusive(x_24); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_24, 0); +x_27 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2; +x_28 = lean_task_map(x_27, x_26, x_23); +lean_ctor_set(x_24, 0, x_28); +return x_24; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_29 = lean_ctor_get(x_24, 0); +x_30 = lean_ctor_get(x_24, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_24); +x_31 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2; +x_32 = lean_task_map(x_31, x_29, x_23); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +} +else +{ +uint8_t x_34; +x_34 = !lean_is_exclusive(x_24); +if (x_34 == 0) +{ +return x_24; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_24, 0); +x_36 = lean_ctor_get(x_24, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_24); +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; +} +} +} +default: +{ +lean_object* x_38; lean_object* x_39; +x_38 = l_IO_AsyncList_waitAll___rarg___closed__1; +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_38); +lean_ctor_set(x_39, 1, x_2); +return x_39; +} +} +} +} +static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2; +return x_2; +} +} +static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___boxed), 1, 0); +return x_1; +} +} +lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_3 = lean_ctor_get(x_1, 4); +x_4 = lean_st_ref_get(x_3, x_2); +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_4, 1); +lean_inc(x_6); +lean_dec(x_4); +x_7 = lean_ctor_get(x_5, 2); +lean_inc(x_7); +lean_dec(x_5); +x_8 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1(x_7, x_6); +if (lean_obj_tag(x_8) == 0) +{ +uint8_t x_9; +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_8, 0); +x_11 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1; +x_12 = l_Task_Priority_default; +x_13 = lean_task_map(x_11, x_10, x_12); +lean_ctor_set(x_8, 0, x_13); +return x_8; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_14 = lean_ctor_get(x_8, 0); +x_15 = lean_ctor_get(x_8, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_8); +x_16 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1; +x_17 = l_Task_Priority_default; +x_18 = lean_task_map(x_16, x_14, x_17); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_15); +return x_19; +} +} +else +{ +uint8_t x_20; +x_20 = !lean_is_exclusive(x_8); +if (x_20 == 0) +{ +return x_8; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_8, 0); +x_22 = lean_ctor_get(x_8, 1); +lean_inc(x_22); +lean_inc(x_21); +lean_dec(x_8); +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_21); +lean_ctor_set(x_23, 1, x_22); +return x_23; +} +} +} +} +lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___boxed), 2, 0); +return x_3; +} +} +lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___lambda__2(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Server_FileWorker_handleWaitForDiagnostics(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} lean_object* l_Lean_Server_FileWorker_parseParams_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -19546,66 +23979,150 @@ static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg _start: { lean_object* x_1; +x_1 = lean_mk_string("textDocument/declaration"); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("textDocument/definition"); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("textDocument/typeDefinition"); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5() { +_start: +{ +lean_object* x_1; x_1 = lean_mk_string("textDocument/documentSymbol"); return x_1; } } -lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_6; uint8_t x_7; -x_6 = l_Lean_Lsp_Ipc_collectDiagnostics___closed__1; -x_7 = lean_string_dec_eq(x_1, x_6); -if (x_7 == 0) +lean_object* x_9; uint8_t x_10; +x_9 = l_Lean_Lsp_Ipc_collectDiagnostics___closed__1; +x_10 = lean_string_dec_eq(x_1, x_9); +if (x_10 == 0) { -lean_object* x_8; uint8_t x_9; +lean_object* x_11; uint8_t x_12; lean_dec(x_2); -x_8 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1; -x_9 = lean_string_dec_eq(x_1, x_8); -if (x_9 == 0) +x_11 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1; +x_12 = lean_string_dec_eq(x_1, x_11); +if (x_12 == 0) { -lean_object* x_10; uint8_t x_11; +lean_object* x_13; uint8_t x_14; lean_dec(x_3); -x_10 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2; -x_11 = lean_string_dec_eq(x_1, x_10); -if (x_11 == 0) +x_13 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2; +x_14 = lean_string_dec_eq(x_1, x_13); +if (x_14 == 0) { -lean_object* x_12; +lean_object* x_15; uint8_t x_16; lean_dec(x_4); -x_12 = lean_apply_1(x_5, x_1); -return x_12; +x_15 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3; +x_16 = lean_string_dec_eq(x_1, x_15); +if (x_16 == 0) +{ +lean_object* x_17; uint8_t x_18; +lean_dec(x_5); +x_17 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4; +x_18 = lean_string_dec_eq(x_1, x_17); +if (x_18 == 0) +{ +lean_object* x_19; uint8_t x_20; +lean_dec(x_6); +x_19 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5; +x_20 = lean_string_dec_eq(x_1, x_19); +if (x_20 == 0) +{ +lean_object* x_21; +lean_dec(x_7); +x_21 = lean_apply_1(x_8, x_1); +return x_21; } else { -lean_object* x_13; lean_object* x_14; +lean_object* x_22; lean_object* x_23; +lean_dec(x_8); +lean_dec(x_1); +x_22 = lean_box(0); +x_23 = lean_apply_1(x_7, x_22); +return x_23; +} +} +else +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_24 = lean_box(0); +x_25 = lean_apply_1(x_6, x_24); +return x_25; +} +} +else +{ +lean_object* x_26; lean_object* x_27; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_26 = lean_box(0); +x_27 = lean_apply_1(x_5, x_26); +return x_27; +} +} +else +{ +lean_object* x_28; lean_object* x_29; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_1); -x_13 = lean_box(0); -x_14 = lean_apply_1(x_4, x_13); -return x_14; +x_28 = lean_box(0); +x_29 = lean_apply_1(x_4, x_28); +return x_29; } } else { -lean_object* x_15; lean_object* x_16; +lean_object* x_30; lean_object* x_31; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); -x_15 = lean_box(0); -x_16 = lean_apply_1(x_3, x_15); -return x_16; +x_30 = lean_box(0); +x_31 = lean_apply_1(x_3, x_30); +return x_31; } } else { -lean_object* x_17; lean_object* x_18; +lean_object* x_32; lean_object* x_33; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); -x_17 = lean_box(0); -x_18 = lean_apply_1(x_2, x_17); -return x_18; +x_32 = lean_box(0); +x_33 = lean_apply_1(x_2, x_32); +return x_33; } } } @@ -19613,7 +24130,7 @@ lean_object* l_Lean_Server_FileWorker_handleRequest_match__2(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest_match__2___rarg), 5, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest_match__2___rarg), 8, 0); return x_2; } } @@ -19621,7 +24138,7 @@ lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_ha _start: { lean_object* x_4; -x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125_(x_1); +x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239_(x_1); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -19705,9 +24222,95 @@ return x_12; } } } +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__5(size_t x_1, size_t x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = x_2 < x_1; +if (x_4 == 0) +{ +lean_object* x_5; +x_5 = x_3; +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; +x_6 = lean_array_uget(x_3, x_2); +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_array_uset(x_3, x_2, x_7); +x_9 = x_6; +x_10 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocationLink____x40_Lean_Data_Lsp_Basic___hyg_584_(x_9); +x_11 = 1; +x_12 = x_2 + x_11; +x_13 = x_10; +x_14 = lean_array_uset(x_8, x_2, x_13); +x_2 = x_12; +x_3 = x_14; +goto _start; +} +} +} lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__4(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; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_4 = lean_ctor_get(x_2, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_2, 1); +lean_inc(x_5); +lean_dec(x_2); +x_6 = lean_array_get_size(x_5); +x_7 = lean_usize_of_nat(x_6); +lean_dec(x_6); +x_8 = 0; +x_9 = x_5; +x_10 = l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__5(x_7, x_8, x_9); +x_11 = x_10; +x_12 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_12, 0, x_11); +x_13 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_13, 0, x_4); +lean_ctor_set(x_13, 1, x_12); +x_14 = l_IO_FS_Stream_writeLspMessage(x_1, x_13, x_3); +lean_dec(x_13); +return x_14; +} +} +lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(x_1); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_5 = l_Lean_Json_compress(x_1); +x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; +x_7 = lean_string_append(x_6, x_5); +lean_dec(x_5); +x_8 = l_Lean_instInhabitedParserDescr___closed__1; +x_9 = lean_string_append(x_7, x_8); +x_10 = l_IO_throwServerError___rarg(x_9, x_3); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; +lean_dec(x_1); +x_11 = lean_ctor_get(x_4, 0); +lean_inc(x_11); +lean_dec(x_4); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_3); +return x_12; +} +} +} +lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ lean_object* x_4; x_4 = lean_ctor_get(x_2, 1); lean_inc(x_4); @@ -19744,7 +24347,7 @@ return x_13; } } } -lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -19775,7 +24378,7 @@ return x_12; } } } -lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__9(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; @@ -19997,7 +24600,78 @@ lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_2); lean_ctor_set(x_22, 1, x_20); -x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__6(x_21, x_22, x_4); +x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__7(x_21, x_22, x_4); +return x_23; +} +} +} +} +lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_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; +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +lean_dec(x_3); +x_6 = lean_ctor_get(x_1, 1); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_io_error_to_string(x_5); +x_8 = lean_box(0); +x_9 = 4; +x_10 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_10, 0, x_2); +lean_ctor_set(x_10, 1, x_7); +lean_ctor_set(x_10, 2, x_8); +lean_ctor_set_uint8(x_10, sizeof(void*)*3, x_9); +x_11 = l_IO_FS_Stream_writeLspResponseError(x_6, x_10, x_4); +lean_dec(x_10); +return x_11; +} +else +{ +lean_object* x_12; +x_12 = lean_ctor_get(x_3, 0); +lean_inc(x_12); +lean_dec(x_3); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +lean_dec(x_12); +x_14 = lean_ctor_get(x_1, 1); +lean_inc(x_14); +lean_dec(x_1); +x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); +x_16 = lean_ctor_get(x_13, 0); +lean_inc(x_16); +lean_dec(x_13); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_18, 0, x_2); +lean_ctor_set(x_18, 1, x_16); +lean_ctor_set(x_18, 2, x_17); +lean_ctor_set_uint8(x_18, sizeof(void*)*3, x_15); +x_19 = l_IO_FS_Stream_writeLspResponseError(x_14, x_18, x_4); +lean_dec(x_18); +return x_19; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_12, 0); +lean_inc(x_20); +lean_dec(x_12); +x_21 = lean_ctor_get(x_1, 1); +lean_inc(x_21); +lean_dec(x_1); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_2); +lean_ctor_set(x_22, 1, x_20); +x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__9(x_21, x_22, x_4); lean_dec(x_22); return x_23; } @@ -20030,359 +24704,728 @@ x_10 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2; x_11 = lean_string_dec_eq(x_2, x_10); if (x_11 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +lean_object* x_12; uint8_t x_13; +x_12 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3; +x_13 = lean_string_dec_eq(x_2, x_12); +if (x_13 == 0) +{ +lean_object* x_14; uint8_t x_15; +x_14 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4; +x_15 = lean_string_dec_eq(x_2, x_14); +if (x_15 == 0) +{ +lean_object* x_16; uint8_t x_17; +x_16 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5; +x_17 = lean_string_dec_eq(x_2, x_16); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); -x_12 = l_Lean_Server_FileWorker_handleRequest___closed__1; -x_13 = lean_string_append(x_12, x_2); -x_14 = l_Lean_instInhabitedParserDescr___closed__1; -x_15 = lean_string_append(x_13, x_14); -x_16 = l_IO_throwServerError___rarg(x_15, x_5); -return x_16; +x_18 = l_Lean_Server_FileWorker_handleRequest___closed__1; +x_19 = lean_string_append(x_18, x_2); +x_20 = l_Lean_instInhabitedParserDescr___closed__1; +x_21 = lean_string_append(x_19, x_20); +x_22 = l_IO_throwServerError___rarg(x_21, x_5); +return x_22; } else { -lean_object* x_17; -x_17 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1(x_3, x_4, x_5); -if (lean_obj_tag(x_17) == 0) +lean_object* x_23; +x_23 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1(x_3, x_4, x_5); +if (lean_obj_tag(x_23) == 0) { -lean_object* x_18; lean_object* x_19; -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); +lean_object* x_24; lean_object* x_25; +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_dec(x_23); lean_inc(x_4); -x_19 = l_Lean_Server_FileWorker_handleDocumentSymbol___rarg(x_4, x_18); -if (lean_obj_tag(x_19) == 0) +x_25 = l_Lean_Server_FileWorker_handleDocumentSymbol___rarg(x_4, x_24); +if (lean_obj_tag(x_25) == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -x_21 = lean_ctor_get(x_19, 1); -lean_inc(x_21); -lean_dec(x_19); -lean_inc(x_1); -lean_inc(x_4); -x_22 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__1), 4, 2); -lean_closure_set(x_22, 0, x_4); -lean_closure_set(x_22, 1, x_1); -x_23 = l_Task_Priority_default; -x_24 = lean_io_map_task(x_22, x_20, x_23, x_21); -if (lean_obj_tag(x_24) == 0) -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_25 = lean_ctor_get(x_24, 0); -lean_inc(x_25); -x_26 = lean_ctor_get(x_24, 1); +lean_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_25, 0); lean_inc(x_26); -lean_dec(x_24); -x_27 = l_Lean_Server_FileWorker_queueRequest(x_1, x_25, x_4, x_26); -lean_dec(x_4); -return x_27; -} -else -{ -uint8_t x_28; -lean_dec(x_4); -lean_dec(x_1); -x_28 = !lean_is_exclusive(x_24); -if (x_28 == 0) -{ -return x_24; -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = lean_ctor_get(x_24, 0); -x_30 = lean_ctor_get(x_24, 1); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_24); -x_31 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -return x_31; -} -} -} -else -{ -uint8_t x_32; -lean_dec(x_4); -lean_dec(x_1); -x_32 = !lean_is_exclusive(x_19); -if (x_32 == 0) -{ -return x_19; -} -else -{ -lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_33 = lean_ctor_get(x_19, 0); -x_34 = lean_ctor_get(x_19, 1); -lean_inc(x_34); -lean_inc(x_33); -lean_dec(x_19); -x_35 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_35, 0, x_33); -lean_ctor_set(x_35, 1, x_34); -return x_35; -} -} -} -else -{ -uint8_t x_36; -lean_dec(x_4); -lean_dec(x_1); -x_36 = !lean_is_exclusive(x_17); -if (x_36 == 0) -{ -return x_17; -} -else -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_17, 0); -x_38 = lean_ctor_get(x_17, 1); -lean_inc(x_38); -lean_inc(x_37); -lean_dec(x_17); -x_39 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_39, 0, x_37); -lean_ctor_set(x_39, 1, x_38); -return x_39; -} -} -} -} -else -{ -lean_object* x_40; -x_40 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3(x_3, x_4, x_5); -if (lean_obj_tag(x_40) == 0) -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_41 = lean_ctor_get(x_40, 0); -lean_inc(x_41); -x_42 = lean_ctor_get(x_40, 1); -lean_inc(x_42); -lean_dec(x_40); -lean_inc(x_4); -x_43 = l_Lean_Server_FileWorker_handleHover___rarg(x_41, x_4, x_42); -if (lean_obj_tag(x_43) == 0) -{ -lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_44 = lean_ctor_get(x_43, 0); -lean_inc(x_44); -x_45 = lean_ctor_get(x_43, 1); -lean_inc(x_45); -lean_dec(x_43); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); lean_inc(x_1); lean_inc(x_4); -x_46 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__2), 4, 2); -lean_closure_set(x_46, 0, x_4); -lean_closure_set(x_46, 1, x_1); -x_47 = l_Task_Priority_default; -x_48 = lean_io_map_task(x_46, x_44, x_47, x_45); -if (lean_obj_tag(x_48) == 0) +x_28 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__1), 4, 2); +lean_closure_set(x_28, 0, x_4); +lean_closure_set(x_28, 1, x_1); +x_29 = l_Task_Priority_default; +x_30 = lean_io_map_task(x_28, x_26, x_29, x_27); +if (lean_obj_tag(x_30) == 0) { -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_48); -x_51 = l_Lean_Server_FileWorker_queueRequest(x_1, x_49, x_4, x_50); +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +lean_dec(x_30); +x_33 = l_Lean_Server_FileWorker_queueRequest(x_1, x_31, x_4, x_32); lean_dec(x_4); -return x_51; +return x_33; } else { -uint8_t x_52; +uint8_t x_34; lean_dec(x_4); lean_dec(x_1); -x_52 = !lean_is_exclusive(x_48); -if (x_52 == 0) +x_34 = !lean_is_exclusive(x_30); +if (x_34 == 0) { -return x_48; +return x_30; } else { -lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_53 = lean_ctor_get(x_48, 0); -x_54 = lean_ctor_get(x_48, 1); -lean_inc(x_54); -lean_inc(x_53); -lean_dec(x_48); -x_55 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_55, 0, x_53); -lean_ctor_set(x_55, 1, x_54); +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_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_38; +lean_dec(x_4); +lean_dec(x_1); +x_38 = !lean_is_exclusive(x_25); +if (x_38 == 0) +{ +return x_25; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_25, 0); +x_40 = lean_ctor_get(x_25, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_25); +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; +} +} +} +else +{ +uint8_t x_42; +lean_dec(x_4); +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_23); +if (x_42 == 0) +{ +return x_23; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_23, 0); +x_44 = lean_ctor_get(x_23, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_23); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +else +{ +lean_object* x_46; +x_46 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3(x_3, x_4, x_5); +if (lean_obj_tag(x_46) == 0) +{ +lean_object* x_47; lean_object* x_48; uint8_t x_49; lean_object* x_50; +x_47 = lean_ctor_get(x_46, 0); +lean_inc(x_47); +x_48 = lean_ctor_get(x_46, 1); +lean_inc(x_48); +lean_dec(x_46); +x_49 = 1; +lean_inc(x_4); +x_50 = l_Lean_Server_FileWorker_handleDefinition(x_49, x_1, x_47, x_4, x_48); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_51 = lean_ctor_get(x_50, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_50, 1); +lean_inc(x_52); +lean_dec(x_50); +lean_inc(x_1); +lean_inc(x_4); +x_53 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__2), 4, 2); +lean_closure_set(x_53, 0, x_4); +lean_closure_set(x_53, 1, x_1); +x_54 = l_Task_Priority_default; +x_55 = lean_io_map_task(x_53, x_51, x_54, x_52); +if (lean_obj_tag(x_55) == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_55, 0); +lean_inc(x_56); +x_57 = lean_ctor_get(x_55, 1); +lean_inc(x_57); +lean_dec(x_55); +x_58 = l_Lean_Server_FileWorker_queueRequest(x_1, x_56, x_4, x_57); +lean_dec(x_4); +return x_58; +} +else +{ +uint8_t x_59; +lean_dec(x_4); +lean_dec(x_1); +x_59 = !lean_is_exclusive(x_55); +if (x_59 == 0) +{ return x_55; } -} -} else { -uint8_t x_56; -lean_dec(x_4); -lean_dec(x_1); -x_56 = !lean_is_exclusive(x_43); -if (x_56 == 0) -{ -return x_43; -} -else -{ -lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_57 = lean_ctor_get(x_43, 0); -x_58 = lean_ctor_get(x_43, 1); -lean_inc(x_58); -lean_inc(x_57); -lean_dec(x_43); -x_59 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_59, 0, x_57); -lean_ctor_set(x_59, 1, x_58); -return x_59; -} -} -} -else -{ -uint8_t x_60; -lean_dec(x_4); -lean_dec(x_1); -x_60 = !lean_is_exclusive(x_40); -if (x_60 == 0) -{ -return x_40; -} -else -{ -lean_object* x_61; lean_object* x_62; lean_object* x_63; -x_61 = lean_ctor_get(x_40, 0); -x_62 = lean_ctor_get(x_40, 1); -lean_inc(x_62); +lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_60 = lean_ctor_get(x_55, 0); +x_61 = lean_ctor_get(x_55, 1); lean_inc(x_61); -lean_dec(x_40); -x_63 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_63, 0, x_61); -lean_ctor_set(x_63, 1, x_62); -return x_63; +lean_inc(x_60); +lean_dec(x_55); +x_62 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_62, 0, x_60); +lean_ctor_set(x_62, 1, x_61); +return x_62; +} +} +} +else +{ +uint8_t x_63; +lean_dec(x_4); +lean_dec(x_1); +x_63 = !lean_is_exclusive(x_50); +if (x_63 == 0) +{ +return x_50; +} +else +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_64 = lean_ctor_get(x_50, 0); +x_65 = lean_ctor_get(x_50, 1); +lean_inc(x_65); +lean_inc(x_64); +lean_dec(x_50); +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_64); +lean_ctor_set(x_66, 1, x_65); +return x_66; +} +} +} +else +{ +uint8_t x_67; +lean_dec(x_4); +lean_dec(x_1); +x_67 = !lean_is_exclusive(x_46); +if (x_67 == 0) +{ +return x_46; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_46, 0); +x_69 = lean_ctor_get(x_46, 1); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_46); +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 { -lean_object* x_64; -x_64 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5(x_3, x_4, x_5); -if (lean_obj_tag(x_64) == 0) -{ -lean_object* x_65; lean_object* x_66; -x_65 = lean_ctor_get(x_64, 1); -lean_inc(x_65); -lean_dec(x_64); -x_66 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg(x_4, x_65); -if (lean_obj_tag(x_66) == 0) -{ -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; -x_67 = lean_ctor_get(x_66, 0); -lean_inc(x_67); -x_68 = lean_ctor_get(x_66, 1); -lean_inc(x_68); -lean_dec(x_66); -lean_inc(x_1); -lean_inc(x_4); -x_69 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__3), 4, 2); -lean_closure_set(x_69, 0, x_4); -lean_closure_set(x_69, 1, x_1); -x_70 = l_Task_Priority_default; -x_71 = lean_io_map_task(x_69, x_67, x_70, x_68); +lean_object* x_71; +x_71 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3(x_3, x_4, x_5); if (lean_obj_tag(x_71) == 0) { -lean_object* x_72; lean_object* x_73; lean_object* x_74; +lean_object* x_72; lean_object* x_73; uint8_t x_74; lean_object* x_75; x_72 = lean_ctor_get(x_71, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_71, 1); lean_inc(x_73); lean_dec(x_71); -x_74 = l_Lean_Server_FileWorker_queueRequest(x_1, x_72, x_4, x_73); +x_74 = 0; +lean_inc(x_4); +x_75 = l_Lean_Server_FileWorker_handleDefinition(x_74, x_1, x_72, x_4, x_73); +if (lean_obj_tag(x_75) == 0) +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_76 = lean_ctor_get(x_75, 0); +lean_inc(x_76); +x_77 = lean_ctor_get(x_75, 1); +lean_inc(x_77); +lean_dec(x_75); +lean_inc(x_1); +lean_inc(x_4); +x_78 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__2), 4, 2); +lean_closure_set(x_78, 0, x_4); +lean_closure_set(x_78, 1, x_1); +x_79 = l_Task_Priority_default; +x_80 = lean_io_map_task(x_78, x_76, x_79, x_77); +if (lean_obj_tag(x_80) == 0) +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_81 = lean_ctor_get(x_80, 0); +lean_inc(x_81); +x_82 = lean_ctor_get(x_80, 1); +lean_inc(x_82); +lean_dec(x_80); +x_83 = l_Lean_Server_FileWorker_queueRequest(x_1, x_81, x_4, x_82); lean_dec(x_4); -return x_74; +return x_83; } else { -uint8_t x_75; +uint8_t x_84; lean_dec(x_4); lean_dec(x_1); -x_75 = !lean_is_exclusive(x_71); -if (x_75 == 0) +x_84 = !lean_is_exclusive(x_80); +if (x_84 == 0) +{ +return x_80; +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_80, 0); +x_86 = lean_ctor_get(x_80, 1); +lean_inc(x_86); +lean_inc(x_85); +lean_dec(x_80); +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_85); +lean_ctor_set(x_87, 1, x_86); +return x_87; +} +} +} +else +{ +uint8_t x_88; +lean_dec(x_4); +lean_dec(x_1); +x_88 = !lean_is_exclusive(x_75); +if (x_88 == 0) +{ +return x_75; +} +else +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_89 = lean_ctor_get(x_75, 0); +x_90 = lean_ctor_get(x_75, 1); +lean_inc(x_90); +lean_inc(x_89); +lean_dec(x_75); +x_91 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_91, 0, x_89); +lean_ctor_set(x_91, 1, x_90); +return x_91; +} +} +} +else +{ +uint8_t x_92; +lean_dec(x_4); +lean_dec(x_1); +x_92 = !lean_is_exclusive(x_71); +if (x_92 == 0) { return x_71; } else { -lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_76 = lean_ctor_get(x_71, 0); -x_77 = lean_ctor_get(x_71, 1); -lean_inc(x_77); -lean_inc(x_76); +lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_93 = lean_ctor_get(x_71, 0); +x_94 = lean_ctor_get(x_71, 1); +lean_inc(x_94); +lean_inc(x_93); lean_dec(x_71); -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; +x_95 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_95, 0, x_93); +lean_ctor_set(x_95, 1, x_94); +return x_95; +} } } } else { -uint8_t x_79; +lean_object* x_96; +x_96 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3(x_3, x_4, x_5); +if (lean_obj_tag(x_96) == 0) +{ +lean_object* x_97; lean_object* x_98; uint8_t x_99; lean_object* x_100; +x_97 = lean_ctor_get(x_96, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_96, 1); +lean_inc(x_98); +lean_dec(x_96); +x_99 = 0; +lean_inc(x_4); +x_100 = l_Lean_Server_FileWorker_handleDefinition(x_99, x_1, x_97, x_4, x_98); +if (lean_obj_tag(x_100) == 0) +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_101 = lean_ctor_get(x_100, 0); +lean_inc(x_101); +x_102 = lean_ctor_get(x_100, 1); +lean_inc(x_102); +lean_dec(x_100); +lean_inc(x_1); +lean_inc(x_4); +x_103 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__2), 4, 2); +lean_closure_set(x_103, 0, x_4); +lean_closure_set(x_103, 1, x_1); +x_104 = l_Task_Priority_default; +x_105 = lean_io_map_task(x_103, x_101, x_104, x_102); +if (lean_obj_tag(x_105) == 0) +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; +x_106 = lean_ctor_get(x_105, 0); +lean_inc(x_106); +x_107 = lean_ctor_get(x_105, 1); +lean_inc(x_107); +lean_dec(x_105); +x_108 = l_Lean_Server_FileWorker_queueRequest(x_1, x_106, x_4, x_107); +lean_dec(x_4); +return x_108; +} +else +{ +uint8_t x_109; lean_dec(x_4); lean_dec(x_1); -x_79 = !lean_is_exclusive(x_66); -if (x_79 == 0) +x_109 = !lean_is_exclusive(x_105); +if (x_109 == 0) { -return x_66; +return x_105; } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_80 = lean_ctor_get(x_66, 0); -x_81 = lean_ctor_get(x_66, 1); -lean_inc(x_81); -lean_inc(x_80); -lean_dec(x_66); -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; +lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_110 = lean_ctor_get(x_105, 0); +x_111 = lean_ctor_get(x_105, 1); +lean_inc(x_111); +lean_inc(x_110); +lean_dec(x_105); +x_112 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_112, 0, x_110); +lean_ctor_set(x_112, 1, x_111); +return x_112; } } } else { -uint8_t x_83; +uint8_t x_113; lean_dec(x_4); lean_dec(x_1); -x_83 = !lean_is_exclusive(x_64); -if (x_83 == 0) +x_113 = !lean_is_exclusive(x_100); +if (x_113 == 0) { -return x_64; +return x_100; } else { -lean_object* x_84; lean_object* x_85; lean_object* x_86; -x_84 = lean_ctor_get(x_64, 0); -x_85 = lean_ctor_get(x_64, 1); -lean_inc(x_85); -lean_inc(x_84); -lean_dec(x_64); -x_86 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_86, 0, x_84); -lean_ctor_set(x_86, 1, x_85); -return x_86; +lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_114 = lean_ctor_get(x_100, 0); +x_115 = lean_ctor_get(x_100, 1); +lean_inc(x_115); +lean_inc(x_114); +lean_dec(x_100); +x_116 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_116, 0, x_114); +lean_ctor_set(x_116, 1, x_115); +return x_116; +} +} +} +else +{ +uint8_t x_117; +lean_dec(x_4); +lean_dec(x_1); +x_117 = !lean_is_exclusive(x_96); +if (x_117 == 0) +{ +return x_96; +} +else +{ +lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_118 = lean_ctor_get(x_96, 0); +x_119 = lean_ctor_get(x_96, 1); +lean_inc(x_119); +lean_inc(x_118); +lean_dec(x_96); +x_120 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_120, 0, x_118); +lean_ctor_set(x_120, 1, x_119); +return x_120; +} +} +} +} +else +{ +lean_object* x_121; +x_121 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6(x_3, x_4, x_5); +if (lean_obj_tag(x_121) == 0) +{ +lean_object* x_122; lean_object* x_123; lean_object* x_124; +x_122 = lean_ctor_get(x_121, 0); +lean_inc(x_122); +x_123 = lean_ctor_get(x_121, 1); +lean_inc(x_123); +lean_dec(x_121); +lean_inc(x_4); +x_124 = l_Lean_Server_FileWorker_handleHover___rarg(x_122, x_4, x_123); +if (lean_obj_tag(x_124) == 0) +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_125 = lean_ctor_get(x_124, 0); +lean_inc(x_125); +x_126 = lean_ctor_get(x_124, 1); +lean_inc(x_126); +lean_dec(x_124); +lean_inc(x_1); +lean_inc(x_4); +x_127 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__3), 4, 2); +lean_closure_set(x_127, 0, x_4); +lean_closure_set(x_127, 1, x_1); +x_128 = l_Task_Priority_default; +x_129 = lean_io_map_task(x_127, x_125, x_128, x_126); +if (lean_obj_tag(x_129) == 0) +{ +lean_object* x_130; lean_object* x_131; lean_object* x_132; +x_130 = lean_ctor_get(x_129, 0); +lean_inc(x_130); +x_131 = lean_ctor_get(x_129, 1); +lean_inc(x_131); +lean_dec(x_129); +x_132 = l_Lean_Server_FileWorker_queueRequest(x_1, x_130, x_4, x_131); +lean_dec(x_4); +return x_132; +} +else +{ +uint8_t x_133; +lean_dec(x_4); +lean_dec(x_1); +x_133 = !lean_is_exclusive(x_129); +if (x_133 == 0) +{ +return x_129; +} +else +{ +lean_object* x_134; lean_object* x_135; lean_object* x_136; +x_134 = lean_ctor_get(x_129, 0); +x_135 = lean_ctor_get(x_129, 1); +lean_inc(x_135); +lean_inc(x_134); +lean_dec(x_129); +x_136 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_136, 0, x_134); +lean_ctor_set(x_136, 1, x_135); +return x_136; +} +} +} +else +{ +uint8_t x_137; +lean_dec(x_4); +lean_dec(x_1); +x_137 = !lean_is_exclusive(x_124); +if (x_137 == 0) +{ +return x_124; +} +else +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; +x_138 = lean_ctor_get(x_124, 0); +x_139 = lean_ctor_get(x_124, 1); +lean_inc(x_139); +lean_inc(x_138); +lean_dec(x_124); +x_140 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_140, 0, x_138); +lean_ctor_set(x_140, 1, x_139); +return x_140; +} +} +} +else +{ +uint8_t x_141; +lean_dec(x_4); +lean_dec(x_1); +x_141 = !lean_is_exclusive(x_121); +if (x_141 == 0) +{ +return x_121; +} +else +{ +lean_object* x_142; lean_object* x_143; lean_object* x_144; +x_142 = lean_ctor_get(x_121, 0); +x_143 = lean_ctor_get(x_121, 1); +lean_inc(x_143); +lean_inc(x_142); +lean_dec(x_121); +x_144 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_144, 0, x_142); +lean_ctor_set(x_144, 1, x_143); +return x_144; +} +} +} +} +else +{ +lean_object* x_145; +x_145 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8(x_3, x_4, x_5); +if (lean_obj_tag(x_145) == 0) +{ +lean_object* x_146; lean_object* x_147; +x_146 = lean_ctor_get(x_145, 1); +lean_inc(x_146); +lean_dec(x_145); +x_147 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg(x_4, x_146); +if (lean_obj_tag(x_147) == 0) +{ +lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; +x_148 = lean_ctor_get(x_147, 0); +lean_inc(x_148); +x_149 = lean_ctor_get(x_147, 1); +lean_inc(x_149); +lean_dec(x_147); +lean_inc(x_1); +lean_inc(x_4); +x_150 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__4), 4, 2); +lean_closure_set(x_150, 0, x_4); +lean_closure_set(x_150, 1, x_1); +x_151 = l_Task_Priority_default; +x_152 = lean_io_map_task(x_150, x_148, x_151, x_149); +if (lean_obj_tag(x_152) == 0) +{ +lean_object* x_153; lean_object* x_154; lean_object* x_155; +x_153 = lean_ctor_get(x_152, 0); +lean_inc(x_153); +x_154 = lean_ctor_get(x_152, 1); +lean_inc(x_154); +lean_dec(x_152); +x_155 = l_Lean_Server_FileWorker_queueRequest(x_1, x_153, x_4, x_154); +lean_dec(x_4); +return x_155; +} +else +{ +uint8_t x_156; +lean_dec(x_4); +lean_dec(x_1); +x_156 = !lean_is_exclusive(x_152); +if (x_156 == 0) +{ +return x_152; +} +else +{ +lean_object* x_157; lean_object* x_158; lean_object* x_159; +x_157 = lean_ctor_get(x_152, 0); +x_158 = lean_ctor_get(x_152, 1); +lean_inc(x_158); +lean_inc(x_157); +lean_dec(x_152); +x_159 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_159, 0, x_157); +lean_ctor_set(x_159, 1, x_158); +return x_159; +} +} +} +else +{ +uint8_t x_160; +lean_dec(x_4); +lean_dec(x_1); +x_160 = !lean_is_exclusive(x_147); +if (x_160 == 0) +{ +return x_147; +} +else +{ +lean_object* x_161; lean_object* x_162; lean_object* x_163; +x_161 = lean_ctor_get(x_147, 0); +x_162 = lean_ctor_get(x_147, 1); +lean_inc(x_162); +lean_inc(x_161); +lean_dec(x_147); +x_163 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_163, 0, x_161); +lean_ctor_set(x_163, 1, x_162); +return x_163; +} +} +} +else +{ +uint8_t x_164; +lean_dec(x_4); +lean_dec(x_1); +x_164 = !lean_is_exclusive(x_145); +if (x_164 == 0) +{ +return x_145; +} +else +{ +lean_object* x_165; lean_object* x_166; lean_object* x_167; +x_165 = lean_ctor_get(x_145, 0); +x_166 = lean_ctor_get(x_145, 1); +lean_inc(x_166); +lean_inc(x_165); +lean_dec(x_145); +x_167 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_167, 0, x_165); +lean_ctor_set(x_167, 1, x_166); +return x_167; } } } @@ -20406,20 +25449,41 @@ lean_dec(x_2); return x_4; } } -lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +size_t x_4; size_t x_5; lean_object* x_6; +x_4 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__5(x_4, x_5, x_3); +return x_6; +} +} +lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5(x_1, x_2, x_3); +x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } -lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__6(x_1, x_2, x_3); +x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__9___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__9(x_1, x_2, x_3); lean_dec(x_2); return x_4; } @@ -20895,7 +25959,7 @@ lean_inc(x_5); x_6 = lean_ctor_get(x_4, 1); lean_inc(x_6); lean_dec(x_4); -x_7 = lean_ctor_get(x_1, 4); +x_7 = lean_ctor_get(x_1, 5); lean_inc(x_7); x_8 = lean_st_ref_get(x_7, x_6); x_9 = lean_ctor_get(x_8, 0); @@ -21171,7 +26235,7 @@ lean_dec(x_45); if (lean_obj_tag(x_46) == 0) { lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; uint8_t x_76; -x_70 = lean_ctor_get(x_1, 3); +x_70 = lean_ctor_get(x_1, 4); lean_inc(x_70); lean_dec(x_1); x_71 = lean_st_ref_get(x_70, x_44); @@ -23216,56 +28280,6 @@ return x_41; } } } -lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initAndRunWorker___spec__5(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; uint8_t x_4; -x_3 = lean_st_mk_ref(x_1, x_2); -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -return x_3; -} -else -{ -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_3, 1); -lean_inc(x_6); -lean_inc(x_5); -lean_dec(x_3); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_5); -lean_ctor_set(x_7, 1, x_6); -return x_7; -} -} -} -lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initAndRunWorker___spec__6(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; uint8_t x_4; -x_3 = lean_st_mk_ref(x_1, x_2); -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -return x_3; -} -else -{ -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_3, 1); -lean_inc(x_6); -lean_inc(x_5); -lean_dec(x_3); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_5); -lean_ctor_set(x_7, 1, x_6); -return x_7; -} -} -} static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__1() { _start: { @@ -23375,124 +28389,104 @@ lean_inc(x_56); x_57 = lean_get_set_stderr(x_56, x_23); if (lean_obj_tag(x_57) == 0) { -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_58; lean_object* x_59; x_58 = lean_ctor_get(x_57, 1); lean_inc(x_58); lean_dec(x_57); -x_59 = l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__5; -x_60 = l_IO_mkRef___at_Lean_Server_FileWorker_initAndRunWorker___spec__5(x_59, x_58); -x_61 = lean_ctor_get(x_60, 0); -lean_inc(x_61); -x_62 = lean_ctor_get(x_60, 1); -lean_inc(x_62); -lean_dec(x_60); -x_63 = lean_box(0); -x_64 = l_IO_mkRef___at_Lean_Server_FileWorker_initAndRunWorker___spec__6(x_63, x_62); -x_65 = lean_ctor_get(x_64, 0); -lean_inc(x_65); -x_66 = lean_ctor_get(x_64, 1); -lean_inc(x_66); -lean_dec(x_64); lean_inc(x_13); -x_67 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_67, 0, x_8); -lean_ctor_set(x_67, 1, x_13); -lean_ctor_set(x_67, 2, x_56); -lean_ctor_set(x_67, 3, x_61); -lean_ctor_set(x_67, 4, x_65); -lean_inc(x_67); lean_inc(x_21); -x_68 = l_Lean_Server_FileWorker_handleDidOpen(x_21, x_67, x_66); -if (lean_obj_tag(x_68) == 0) +x_59 = l_Lean_Server_FileWorker_initializeWorker(x_21, x_8, x_13, x_56, x_58); +if (lean_obj_tag(x_59) == 0) { -lean_object* x_69; lean_object* x_70; -x_69 = lean_ctor_get(x_68, 1); -lean_inc(x_69); -lean_dec(x_68); -x_70 = l_Lean_Server_FileWorker_mainLoop(x_67, x_69); -if (lean_obj_tag(x_70) == 0) +lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_60 = lean_ctor_get(x_59, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_59, 1); +lean_inc(x_61); +lean_dec(x_59); +x_62 = l_Lean_Server_FileWorker_mainLoop(x_60, x_61); +if (lean_obj_tag(x_62) == 0) { -uint8_t x_71; +uint8_t x_63; lean_dec(x_24); lean_dec(x_22); lean_dec(x_21); lean_dec(x_13); -x_71 = !lean_is_exclusive(x_70); -if (x_71 == 0) +x_63 = !lean_is_exclusive(x_62); +if (x_63 == 0) { -lean_object* x_72; lean_object* x_73; -x_72 = lean_ctor_get(x_70, 0); -lean_dec(x_72); -x_73 = l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2; -lean_ctor_set(x_70, 0, x_73); -return x_70; +lean_object* x_64; lean_object* x_65; +x_64 = lean_ctor_get(x_62, 0); +lean_dec(x_64); +x_65 = l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2; +lean_ctor_set(x_62, 0, x_65); +return x_62; } else { -lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_74 = lean_ctor_get(x_70, 1); -lean_inc(x_74); -lean_dec(x_70); -x_75 = l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2; -x_76 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_76, 0, x_75); -lean_ctor_set(x_76, 1, x_74); -return x_76; +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_62, 1); +lean_inc(x_66); +lean_dec(x_62); +x_67 = l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2; +x_68 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_66); +return x_68; } } else { -lean_object* x_77; lean_object* x_78; -x_77 = lean_ctor_get(x_70, 0); -lean_inc(x_77); -x_78 = lean_ctor_get(x_70, 1); -lean_inc(x_78); -lean_dec(x_70); -x_25 = x_77; -x_26 = x_78; +lean_object* x_69; lean_object* x_70; +x_69 = lean_ctor_get(x_62, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_62, 1); +lean_inc(x_70); +lean_dec(x_62); +x_25 = x_69; +x_26 = x_70; goto block_51; } } else { -lean_object* x_79; lean_object* x_80; -lean_dec(x_67); -x_79 = lean_ctor_get(x_68, 0); -lean_inc(x_79); -x_80 = lean_ctor_get(x_68, 1); -lean_inc(x_80); -lean_dec(x_68); -x_25 = x_79; -x_26 = x_80; +lean_object* x_71; lean_object* x_72; +x_71 = lean_ctor_get(x_59, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_59, 1); +lean_inc(x_72); +lean_dec(x_59); +x_25 = x_71; +x_26 = x_72; goto block_51; } } else { -uint8_t x_81; +uint8_t x_73; lean_dec(x_56); lean_dec(x_24); lean_dec(x_22); lean_dec(x_21); lean_dec(x_13); lean_dec(x_8); -x_81 = !lean_is_exclusive(x_57); -if (x_81 == 0) +x_73 = !lean_is_exclusive(x_57); +if (x_73 == 0) { return x_57; } else { -lean_object* x_82; lean_object* x_83; lean_object* x_84; -x_82 = lean_ctor_get(x_57, 0); -x_83 = lean_ctor_get(x_57, 1); -lean_inc(x_83); -lean_inc(x_82); +lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_74 = lean_ctor_get(x_57, 0); +x_75 = lean_ctor_get(x_57, 1); +lean_inc(x_75); +lean_inc(x_74); lean_dec(x_57); -x_84 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_84, 0, x_82); -lean_ctor_set(x_84, 1, x_83); -return x_84; +x_76 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_76, 0, x_74); +lean_ctor_set(x_76, 1, x_75); +return x_76; } } block_51: @@ -23583,23 +28577,74 @@ return x_50; } else { -uint8_t x_85; +uint8_t x_77; lean_dec(x_13); lean_dec(x_8); lean_dec(x_3); -x_85 = !lean_is_exclusive(x_19); -if (x_85 == 0) +x_77 = !lean_is_exclusive(x_19); +if (x_77 == 0) { return x_19; } else { +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_19, 0); +x_79 = lean_ctor_get(x_19, 1); +lean_inc(x_79); +lean_inc(x_78); +lean_dec(x_19); +x_80 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_80, 0, x_78); +lean_ctor_set(x_80, 1, x_79); +return x_80; +} +} +} +else +{ +uint8_t x_81; +lean_dec(x_13); +lean_dec(x_8); +lean_dec(x_3); +x_81 = !lean_is_exclusive(x_16); +if (x_81 == 0) +{ +return x_16; +} +else +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_16, 0); +x_83 = lean_ctor_get(x_16, 1); +lean_inc(x_83); +lean_inc(x_82); +lean_dec(x_16); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; +} +} +} +else +{ +uint8_t x_85; +lean_dec(x_8); +lean_dec(x_3); +x_85 = !lean_is_exclusive(x_12); +if (x_85 == 0) +{ +return x_12; +} +else +{ lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_86 = lean_ctor_get(x_19, 0); -x_87 = lean_ctor_get(x_19, 1); +x_86 = lean_ctor_get(x_12, 0); +x_87 = lean_ctor_get(x_12, 1); lean_inc(x_87); lean_inc(x_86); -lean_dec(x_19); +lean_dec(x_12); x_88 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_88, 0, x_86); lean_ctor_set(x_88, 1, x_87); @@ -23610,76 +28655,25 @@ return x_88; else { uint8_t x_89; -lean_dec(x_13); -lean_dec(x_8); -lean_dec(x_3); -x_89 = !lean_is_exclusive(x_16); -if (x_89 == 0) -{ -return x_16; -} -else -{ -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_16, 0); -x_91 = lean_ctor_get(x_16, 1); -lean_inc(x_91); -lean_inc(x_90); -lean_dec(x_16); -x_92 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_92, 0, x_90); -lean_ctor_set(x_92, 1, x_91); -return x_92; -} -} -} -else -{ -uint8_t x_93; -lean_dec(x_8); -lean_dec(x_3); -x_93 = !lean_is_exclusive(x_12); -if (x_93 == 0) -{ -return x_12; -} -else -{ -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_12, 0); -x_95 = lean_ctor_get(x_12, 1); -lean_inc(x_95); -lean_inc(x_94); -lean_dec(x_12); -x_96 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_96, 0, x_94); -lean_ctor_set(x_96, 1, x_95); -return x_96; -} -} -} -else -{ -uint8_t x_97; lean_dec(x_3); lean_dec(x_2); -x_97 = !lean_is_exclusive(x_7); -if (x_97 == 0) +x_89 = !lean_is_exclusive(x_7); +if (x_89 == 0) { return x_7; } else { -lean_object* x_98; lean_object* x_99; lean_object* x_100; -x_98 = lean_ctor_get(x_7, 0); -x_99 = lean_ctor_get(x_7, 1); -lean_inc(x_99); -lean_inc(x_98); +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_7, 0); +x_91 = lean_ctor_get(x_7, 1); +lean_inc(x_91); +lean_inc(x_90); lean_dec(x_7); -x_100 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_100, 0, x_98); -lean_ctor_set(x_100, 1, x_99); -return x_100; +x_92 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_92, 0, x_90); +lean_ctor_set(x_92, 1, x_91); +return x_92; } } } @@ -24028,6 +29022,7 @@ lean_object* initialize_Init_System_IO(lean_object*); lean_object* initialize_Std_Data_RBMap(lean_object*); lean_object* initialize_Lean_Environment(lean_object*); lean_object* initialize_Lean_PrettyPrinter(lean_object*); +lean_object* initialize_Lean_DeclarationRange(lean_object*); lean_object* initialize_Lean_Data_Lsp(lean_object*); lean_object* initialize_Lean_Data_Json_FromToJson(lean_object*); lean_object* initialize_Lean_Server_Snapshots(lean_object*); @@ -24054,6 +29049,9 @@ lean_dec_ref(res); res = initialize_Lean_PrettyPrinter(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_DeclarationRange(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Lean_Data_Lsp(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -24120,20 +29118,24 @@ l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4 = _init_l_Lean_Serve lean_mark_persistent(l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4); l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5 = _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5(); lean_mark_persistent(l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5); -l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__1 = _init_l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__1); -l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__2 = _init_l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__2(); -lean_mark_persistent(l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__2); -l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__3 = _init_l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__3(); -lean_mark_persistent(l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__3); -l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__4 = _init_l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__4(); -lean_mark_persistent(l_Lean_Server_FileWorker_compileDocument___lambda__1___closed__4); -l_Lean_Server_FileWorker_compileDocument___closed__1 = _init_l_Lean_Server_FileWorker_compileDocument___closed__1(); -lean_mark_persistent(l_Lean_Server_FileWorker_compileDocument___closed__1); -l_Lean_Server_FileWorker_compileDocument___closed__2 = _init_l_Lean_Server_FileWorker_compileDocument___closed__2(); -lean_mark_persistent(l_Lean_Server_FileWorker_compileDocument___closed__2); -l_Lean_Server_FileWorker_compileDocument___closed__3 = _init_l_Lean_Server_FileWorker_compileDocument___closed__3(); -lean_mark_persistent(l_Lean_Server_FileWorker_compileDocument___closed__3); +l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6 = _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6(); +lean_mark_persistent(l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6); +l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__1 = _init_l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__1); +l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__2 = _init_l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__2); +l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__3 = _init_l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__3(); +lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__3); +l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__4 = _init_l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__4(); +lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__4); +l_Lean_Server_FileWorker_compileHeader___lambda__2___closed__1 = _init_l_Lean_Server_FileWorker_compileHeader___lambda__2___closed__1(); +lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___lambda__2___closed__1); +l_Lean_Server_FileWorker_compileHeader___closed__1 = _init_l_Lean_Server_FileWorker_compileHeader___closed__1(); +lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__1); +l_Lean_Server_FileWorker_compileHeader___closed__2 = _init_l_Lean_Server_FileWorker_compileHeader___closed__2(); +lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__2); +l_Lean_Server_FileWorker_compileHeader___closed__3 = _init_l_Lean_Server_FileWorker_compileHeader___closed__3(); +lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__3); l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1 = _init_l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1); l_Lean_Server_FileWorker_updateDocument___closed__1 = _init_l_Lean_Server_FileWorker_updateDocument___closed__1(); @@ -24148,48 +29150,30 @@ l_Lean_Server_FileWorker_RequestError_fileChanged___closed__2 = _init_l_Lean_Ser lean_mark_persistent(l_Lean_Server_FileWorker_RequestError_fileChanged___closed__2); l_Lean_Server_FileWorker_RequestError_fileChanged = _init_l_Lean_Server_FileWorker_RequestError_fileChanged(); lean_mark_persistent(l_Lean_Server_FileWorker_RequestError_fileChanged); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__1(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__1); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__2(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__2); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__3 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__3(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__3); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__4 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__4(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__4); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__5 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__5(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__5); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__6 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__6(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__6); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__7 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__7(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__7); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__8 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__8(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__8); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__9 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__9(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___lambda__1___closed__9); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__1(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__1); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__2(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__2); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__3 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__3(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__3); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__4 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__4(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__4); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__5 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__5(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__5); -l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__6 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__6(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__12___closed__6); -l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___closed__1 = _init_l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_Server_FileWorker_handleHover___rarg___lambda__1___closed__1); -l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1 = _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1(); -lean_mark_persistent(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1); -l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2 = _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2(); -lean_mark_persistent(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2); -l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1); -l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2(); -lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2); -l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1(); -lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1); +l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1 = _init_l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__1(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__2(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__2); +l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__3 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__3(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__3); +l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__4 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__4(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__4); +l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__5 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__5(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__5); +l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__6 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__6(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__6___closed__6); +l_Lean_Server_FileWorker_handleHover___rarg___closed__1 = _init_l_Lean_Server_FileWorker_handleHover___rarg___closed__1(); +lean_mark_persistent(l_Lean_Server_FileWorker_handleHover___rarg___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__1(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___closed__2); +l_Lean_Server_FileWorker_handleDefinition___closed__1 = _init_l_Lean_Server_FileWorker_handleDefinition___closed__1(); +lean_mark_persistent(l_Lean_Server_FileWorker_handleDefinition___closed__1); +l_Lean_Server_FileWorker_handleDefinition___closed__2 = _init_l_Lean_Server_FileWorker_handleDefinition___closed__2(); +lean_mark_persistent(l_Lean_Server_FileWorker_handleDefinition___closed__2); l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1 = _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1); l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__2 = _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__2(); @@ -24202,6 +29186,16 @@ l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__2 = _i lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__2); l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1 = _init_l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1); +l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1 = _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1(); +lean_mark_persistent(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__1); +l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2 = _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2(); +lean_mark_persistent(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleWaitForDiagnostics___spec__1___closed__2); +l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__1); +l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___lambda__1___closed__2); +l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1(); +lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___rarg___closed__1); l_Lean_Server_FileWorker_parseParams___rarg___closed__1 = _init_l_Lean_Server_FileWorker_parseParams___rarg___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_parseParams___rarg___closed__1); l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__1 = _init_l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__1(); @@ -24214,6 +29208,12 @@ l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1 = _init_l_Lea lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2); +l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3(); +lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3); +l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4(); +lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4); +l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5(); +lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5); l_Lean_Server_FileWorker_handleRequest___closed__1 = _init_l_Lean_Server_FileWorker_handleRequest___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest___closed__1); l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1 = _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1(); diff --git a/stage0/stdlib/Lean/Server/InfoUtils.c b/stage0/stdlib/Lean/Server/InfoUtils.c index ad15fb3bc4..26cd75f273 100644 --- a/stage0/stdlib/Lean/Server/InfoUtils.c +++ b/stage0/stdlib/Lean/Server/InfoUtils.c @@ -14,68 +14,117 @@ extern "C" { #endif lean_object* l_Lean_Elab_TermInfo_pos_x3f(lean_object*); +uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__2(lean_object*, lean_object*, size_t, size_t); size_t l_USize_add(size_t, size_t); +extern lean_object* l_Lean_fieldIdxKind; +lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__5(lean_object*, size_t, size_t, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__4___rarg(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__3(lean_object*, size_t, size_t, lean_object*); lean_object* l_Std_PersistentArray_foldlM___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__6(lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l___private_Std_Data_PersistentArray_0__Std_PersistentArray_foldlMAux___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__8(lean_object*, lean_object*); uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_Array_contains___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__1___boxed(lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_Elab_InfoTree_smallestNodes_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__2(lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__7; lean_object* l_Lean_Elab_InfoTree_smallestNode_x3f_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_sub(size_t, size_t); +lean_object* l_Array_getMax_x3f___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__4(lean_object*); lean_object* l_Std_PersistentArray_foldlM___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__6___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_PersistentArray_empty___closed__1; +uint8_t lean_name_eq(lean_object*, lean_object*); +extern lean_object* l_instInhabitedNat; +lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +extern lean_object* l_Lean_interpolatedStrKind; +lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_shiftRight(size_t, size_t); lean_object* l_List_join___rarg(lean_object*); uint8_t l_USize_decLt(size_t, size_t); +extern lean_object* l_Lean_nameLitKind; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_InfoTree_smallestNodes_match__1(lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_getMax_x3f___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__4___boxed(lean_object*); lean_object* l_Std_PersistentArray_get_x21___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__11(lean_object*, lean_object*); +lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +extern lean_object* l_Lean_numLitKind; lean_object* l_Lean_Elab_TermInfo_pos_x3f___boxed(lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_InfoTree_smallestNode_x3f_match__1(lean_object*); +extern lean_object* l_Lean_strLitKind; +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f(lean_object*, lean_object*); lean_object* l___private_Std_Data_PersistentArray_0__Std_PersistentArray_foldlMAux___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__8___boxed(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_mapMAux___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__2(lean_object*, lean_object*); lean_object* l___private_Std_Data_PersistentArray_0__Std_PersistentArray_foldlFromMAux___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__7(lean_object*, size_t, size_t, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__3(lean_object*); +uint8_t l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1(lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__9(lean_object*, size_t, size_t, lean_object*); +lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_charLitKind; lean_object* l_Lean_Elab_InfoTree_smallestNode_x3f(lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__10(lean_object*, size_t, size_t, lean_object*); size_t l_USize_shiftLeft(size_t, size_t); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__8; lean_object* l_Std_PersistentArray_getAux___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__12___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Std_PersistentArray_isEmpty___rarg(lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__4; +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__1; +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__4(lean_object*); size_t lean_usize_of_nat(lean_object*); size_t l_USize_land(size_t, size_t); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__9; lean_object* l_Std_PersistentArray_toList___rarg(lean_object*); lean_object* l_Lean_Elab_TacticInfo_pos_x3f___boxed(lean_object*); +extern lean_object* l_Lean_identKind; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(lean_object*); +extern lean_object* l_Option_get_x21___rarg___closed__4; +lean_object* l_List_redLength___rarg(lean_object*); lean_object* l_Std_PersistentArray_push___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__3; +extern lean_object* l_Lean_scientificLitKind; +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__2___rarg(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__2; lean_object* l_Lean_Elab_TacticInfo_pos_x3f(lean_object*); +lean_object* l_Lean_Syntax_getKind(lean_object*); +lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l___private_Std_Data_PersistentArray_0__Std_PersistentArray_foldlFromMAux___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__5(lean_object*, size_t, size_t, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__5; +uint8_t l_Array_contains___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__1(lean_object*, lean_object*); lean_object* l_Std_PersistentArray_get_x21___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__11___boxed(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getPos(lean_object*); lean_object* l_Std_PersistentArray_getAux___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__12(lean_object*, size_t, size_t); lean_object* l_Lean_Elab_TacticInfo_tailPos_x3f(lean_object*); +lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); lean_object* l_List_map___at_Lean_Elab_InfoTree_smallestNodes___spec__2(lean_object*, lean_object*); lean_object* l_Std_PersistentArray_mapM___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getTailPos(lean_object*); lean_object* l_List_map___at_Lean_Elab_InfoTree_smallestNodes___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__6; lean_object* l_Lean_Elab_InfoTree_smallestNodes(lean_object*, lean_object*); lean_object* l_Lean_Elab_TermInfo_tailPos_x3f(lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* lean_usize_to_nat(size_t); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_InfoTree_smallestNode_x3f___spec__4(lean_object*, size_t, size_t, lean_object*); +extern lean_object* l___private_Lean_MonadEnv_0__Lean_supportedRecursors___closed__14; +extern lean_object* l_Lean_interpolatedStrLitKind; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__1(lean_object*); extern lean_object* l_Std_PersistentArray_getAux___rarg___closed__1; lean_object* l_Lean_Elab_InfoTree_smallestNode_x3f_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: @@ -1287,6 +1336,928 @@ x_3 = l_Lean_Syntax_getTailPos(x_2); return x_3; } } +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_5; +lean_dec(x_3); +x_5 = lean_apply_2(x_4, x_1, x_2); +return x_5; +} +else +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_6; +lean_dec(x_3); +x_6 = lean_apply_2(x_4, x_1, x_2); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_dec(x_4); +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_ctor_get(x_2, 0); +lean_inc(x_8); +lean_dec(x_2); +x_9 = lean_apply_2(x_3, x_7, x_8); +return x_9; +} +} +} +} +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__1___rarg), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_4; lean_object* x_5; +lean_dec(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_1(x_2, x_4); +return x_5; +} +else +{ +lean_object* x_6; +lean_dec(x_2); +x_6 = lean_apply_1(x_3, x_1); +return x_6; +} +} +} +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__2___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_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; +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +if (lean_obj_tag(x_4) == 1) +{ +lean_object* x_5; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +if (lean_obj_tag(x_5) == 1) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_dec(x_3); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = lean_ctor_get(x_5, 0); +lean_inc(x_8); +lean_dec(x_5); +x_9 = lean_apply_3(x_2, x_6, x_8, x_7); +return x_9; +} +else +{ +lean_object* x_10; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_10 = lean_apply_1(x_3, x_1); +return x_10; +} +} +else +{ +lean_object* x_11; +lean_dec(x_4); +lean_dec(x_2); +x_11 = lean_apply_1(x_3, x_1); +return x_11; +} +} +else +{ +lean_object* x_12; +lean_dec(x_2); +x_12 = lean_apply_1(x_3, x_1); +return x_12; +} +} +} +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__3___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__4___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +lean_dec(x_3); +x_7 = lean_apply_3(x_2, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_InfoTree_hoverableTermAt_x3f_match__4___rarg), 2, 0); +return x_2; +} +} +uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__2(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4) { +_start: +{ +uint8_t x_5; +x_5 = x_3 == x_4; +if (x_5 == 0) +{ +lean_object* x_6; uint8_t x_7; +x_6 = lean_array_uget(x_2, x_3); +x_7 = lean_name_eq(x_1, x_6); +lean_dec(x_6); +if (x_7 == 0) +{ +size_t x_8; size_t x_9; +x_8 = 1; +x_9 = x_3 + x_8; +x_3 = x_9; +goto _start; +} +else +{ +uint8_t x_11; +x_11 = 1; +return x_11; +} +} +else +{ +uint8_t x_12; +x_12 = 0; +return x_12; +} +} +} +uint8_t l_Array_contains___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_3 = lean_array_get_size(x_1); +x_4 = lean_unsigned_to_nat(0u); +x_5 = lean_nat_dec_lt(x_4, x_3); +if (x_5 == 0) +{ +uint8_t x_6; +lean_dec(x_3); +x_6 = 0; +return x_6; +} +else +{ +uint8_t x_7; +x_7 = lean_nat_dec_le(x_3, x_3); +if (x_7 == 0) +{ +uint8_t x_8; +lean_dec(x_3); +x_8 = 0; +return x_8; +} +else +{ +size_t x_9; size_t x_10; uint8_t x_11; +x_9 = 0; +x_10 = lean_usize_of_nat(x_3); +lean_dec(x_3); +x_11 = l_Array_anyMUnsafe_any___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__2(x_2, x_1, x_9, x_10); +return x_11; +} +} +} +} +lean_object* l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_2; +x_2 = lean_box(0); +return x_2; +} +else +{ +lean_object* x_3; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +if (lean_obj_tag(x_3) == 0) +{ +lean_object* x_4; +x_4 = lean_ctor_get(x_3, 1); +lean_inc(x_4); +if (lean_obj_tag(x_4) == 1) +{ +lean_object* x_5; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +lean_dec(x_4); +if (lean_obj_tag(x_5) == 1) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_1); +if (x_6 == 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; +x_7 = lean_ctor_get(x_1, 1); +x_8 = lean_ctor_get(x_1, 0); +lean_dec(x_8); +x_9 = lean_ctor_get(x_3, 0); +lean_inc(x_9); +lean_dec(x_3); +x_10 = lean_ctor_get(x_5, 0); +lean_inc(x_10); +lean_dec(x_5); +lean_inc(x_10); +x_11 = l_Lean_Elab_TermInfo_tailPos_x3f(x_10); +x_12 = l_Lean_Elab_TermInfo_pos_x3f(x_10); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_9); +lean_ctor_set(x_13, 1, x_10); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = l_instInhabitedNat; +x_15 = l_Option_get_x21___rarg___closed__4; +x_16 = lean_panic_fn(x_14, x_15); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_panic_fn(x_14, x_15); +x_18 = lean_nat_sub(x_16, x_17); +lean_dec(x_17); +lean_dec(x_16); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_13); +x_20 = l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(x_7); +lean_ctor_set(x_1, 1, x_20); +lean_ctor_set(x_1, 0, x_19); +return x_1; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_21 = lean_ctor_get(x_12, 0); +lean_inc(x_21); +lean_dec(x_12); +x_22 = lean_nat_sub(x_16, x_21); +lean_dec(x_21); +lean_dec(x_16); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_13); +x_24 = l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(x_7); +lean_ctor_set(x_1, 1, x_24); +lean_ctor_set(x_1, 0, x_23); +return x_1; +} +} +else +{ +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_25 = lean_ctor_get(x_11, 0); +lean_inc(x_25); +lean_dec(x_11); +x_26 = l_instInhabitedNat; +x_27 = l_Option_get_x21___rarg___closed__4; +x_28 = lean_panic_fn(x_26, x_27); +x_29 = lean_nat_sub(x_25, x_28); +lean_dec(x_28); +lean_dec(x_25); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_13); +x_31 = l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(x_7); +lean_ctor_set(x_1, 1, x_31); +lean_ctor_set(x_1, 0, x_30); +return x_1; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_32 = lean_ctor_get(x_11, 0); +lean_inc(x_32); +lean_dec(x_11); +x_33 = lean_ctor_get(x_12, 0); +lean_inc(x_33); +lean_dec(x_12); +x_34 = lean_nat_sub(x_32, x_33); +lean_dec(x_33); +lean_dec(x_32); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_13); +x_36 = l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(x_7); +lean_ctor_set(x_1, 1, x_36); +lean_ctor_set(x_1, 0, x_35); +return x_1; +} +} +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_37 = lean_ctor_get(x_1, 1); +lean_inc(x_37); +lean_dec(x_1); +x_38 = lean_ctor_get(x_3, 0); +lean_inc(x_38); +lean_dec(x_3); +x_39 = lean_ctor_get(x_5, 0); +lean_inc(x_39); +lean_dec(x_5); +lean_inc(x_39); +x_40 = l_Lean_Elab_TermInfo_tailPos_x3f(x_39); +x_41 = l_Lean_Elab_TermInfo_pos_x3f(x_39); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_38); +lean_ctor_set(x_42, 1, x_39); +if (lean_obj_tag(x_40) == 0) +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = l_instInhabitedNat; +x_44 = l_Option_get_x21___rarg___closed__4; +x_45 = lean_panic_fn(x_43, x_44); +if (lean_obj_tag(x_41) == 0) +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_46 = lean_panic_fn(x_43, x_44); +x_47 = lean_nat_sub(x_45, x_46); +lean_dec(x_46); +lean_dec(x_45); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_42); +x_49 = l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(x_37); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_48); +lean_ctor_set(x_50, 1, x_49); +return x_50; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_51 = lean_ctor_get(x_41, 0); +lean_inc(x_51); +lean_dec(x_41); +x_52 = lean_nat_sub(x_45, x_51); +lean_dec(x_51); +lean_dec(x_45); +x_53 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_42); +x_54 = l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(x_37); +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 +{ +if (lean_obj_tag(x_41) == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_56 = lean_ctor_get(x_40, 0); +lean_inc(x_56); +lean_dec(x_40); +x_57 = l_instInhabitedNat; +x_58 = l_Option_get_x21___rarg___closed__4; +x_59 = lean_panic_fn(x_57, x_58); +x_60 = lean_nat_sub(x_56, x_59); +lean_dec(x_59); +lean_dec(x_56); +x_61 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_61, 0, x_60); +lean_ctor_set(x_61, 1, x_42); +x_62 = l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(x_37); +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_61); +lean_ctor_set(x_63, 1, x_62); +return x_63; +} +else +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_64 = lean_ctor_get(x_40, 0); +lean_inc(x_64); +lean_dec(x_40); +x_65 = lean_ctor_get(x_41, 0); +lean_inc(x_65); +lean_dec(x_41); +x_66 = lean_nat_sub(x_64, x_65); +lean_dec(x_65); +lean_dec(x_64); +x_67 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_67, 0, x_66); +lean_ctor_set(x_67, 1, x_42); +x_68 = l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(x_37); +x_69 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_69, 0, x_67); +lean_ctor_set(x_69, 1, x_68); +return x_69; +} +} +} +} +else +{ +lean_object* x_70; +lean_dec(x_5); +lean_dec(x_3); +x_70 = lean_ctor_get(x_1, 1); +lean_inc(x_70); +lean_dec(x_1); +x_1 = x_70; +goto _start; +} +} +else +{ +lean_object* x_72; +lean_dec(x_4); +lean_dec(x_3); +x_72 = lean_ctor_get(x_1, 1); +lean_inc(x_72); +lean_dec(x_1); +x_1 = x_72; +goto _start; +} +} +else +{ +lean_object* x_74; +lean_dec(x_3); +x_74 = lean_ctor_get(x_1, 1); +lean_inc(x_74); +lean_dec(x_1); +x_1 = x_74; +goto _start; +} +} +} +} +lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__5(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = x_2 == x_3; +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; size_t x_10; size_t x_11; +x_6 = lean_array_uget(x_1, x_2); +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_4, 0); +lean_inc(x_8); +x_9 = lean_nat_dec_lt(x_7, x_8); +lean_dec(x_8); +lean_dec(x_7); +x_10 = 1; +x_11 = x_2 + x_10; +if (x_9 == 0) +{ +lean_dec(x_6); +x_2 = x_11; +goto _start; +} +else +{ +lean_dec(x_4); +x_2 = x_11; +x_4 = x_6; +goto _start; +} +} +else +{ +return x_4; +} +} +} +lean_object* l_Array_getMax_x3f___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; uint8_t x_4; +x_2 = lean_array_get_size(x_1); +x_3 = lean_unsigned_to_nat(0u); +x_4 = lean_nat_dec_lt(x_3, x_2); +if (x_4 == 0) +{ +lean_object* x_5; +lean_dec(x_2); +x_5 = lean_box(0); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_6 = lean_array_fget(x_1, x_3); +x_7 = lean_unsigned_to_nat(1u); +x_8 = lean_nat_dec_lt(x_7, x_2); +if (x_8 == 0) +{ +lean_object* x_9; +lean_dec(x_2); +x_9 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_9, 0, x_6); +return x_9; +} +else +{ +uint8_t x_10; +x_10 = lean_nat_dec_le(x_2, x_2); +if (x_10 == 0) +{ +lean_object* x_11; +lean_dec(x_2); +x_11 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_11, 0, x_6); +return x_11; +} +else +{ +size_t x_12; size_t x_13; lean_object* x_14; lean_object* x_15; +x_12 = 1; +x_13 = lean_usize_of_nat(x_2); +lean_dec(x_2); +x_14 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__5(x_1, x_12, x_13, x_6); +x_15 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_15, 0, x_14); +return x_15; +} +} +} +} +} +static lean_object* _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___private_Lean_MonadEnv_0__Lean_supportedRecursors___closed__14; +x_2 = l_Lean_identKind; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__1; +x_2 = l_Lean_strLitKind; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__2; +x_2 = l_Lean_charLitKind; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__3; +x_2 = l_Lean_numLitKind; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__4; +x_2 = l_Lean_scientificLitKind; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__5; +x_2 = l_Lean_nameLitKind; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__6; +x_2 = l_Lean_fieldIdxKind; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__7; +x_2 = l_Lean_interpolatedStrLitKind; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__8; +x_2 = l_Lean_interpolatedStrKind; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +uint8_t l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 1) +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +lean_dec(x_2); +x_4 = l_Lean_Elab_TermInfo_pos_x3f(x_3); +if (lean_obj_tag(x_4) == 0) +{ +uint8_t x_5; +lean_dec(x_3); +x_5 = 0; +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_ctor_get(x_4, 0); +lean_inc(x_6); +lean_dec(x_4); +lean_inc(x_3); +x_7 = l_Lean_Elab_TermInfo_tailPos_x3f(x_3); +if (lean_obj_tag(x_7) == 0) +{ +uint8_t x_8; +lean_dec(x_6); +lean_dec(x_3); +x_8 = 0; +return x_8; +} +else +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_ctor_get(x_7, 0); +lean_inc(x_9); +lean_dec(x_7); +x_10 = lean_nat_dec_le(x_6, x_1); +lean_dec(x_6); +if (x_10 == 0) +{ +uint8_t x_11; +lean_dec(x_9); +lean_dec(x_3); +x_11 = 0; +return x_11; +} +else +{ +uint8_t x_12; +x_12 = lean_nat_dec_lt(x_1, x_9); +lean_dec(x_9); +if (x_12 == 0) +{ +uint8_t x_13; +lean_dec(x_3); +x_13 = 0; +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_14 = lean_ctor_get(x_3, 2); +lean_inc(x_14); +lean_dec(x_3); +x_15 = l_Lean_Syntax_getKind(x_14); +x_16 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__9; +x_17 = l_Array_contains___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__1(x_16, x_15); +lean_dec(x_15); +return x_17; +} +} +} +} +} +else +{ +uint8_t x_18; +lean_dec(x_2); +x_18 = 0; +return x_18; +} +} +} +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_3 = lean_alloc_closure((void*)(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___boxed), 2, 1); +lean_closure_set(x_3, 0, x_2); +x_4 = l_Lean_Elab_InfoTree_smallestNodes(x_3, x_1); +x_5 = l_List_filterMap___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__3(x_4); +x_6 = l_List_redLength___rarg(x_5); +x_7 = lean_mk_empty_array_with_capacity(x_6); +lean_dec(x_6); +x_8 = l_List_toArrayAux___rarg(x_5, x_7); +x_9 = l_Array_getMax_x3f___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__4(x_8); +lean_dec(x_8); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; +x_10 = lean_box(0); +return x_10; +} +else +{ +uint8_t x_11; +x_11 = !lean_is_exclusive(x_9); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_12 = lean_ctor_get(x_9, 0); +x_13 = lean_ctor_get(x_12, 1); +lean_inc(x_13); +lean_dec(x_12); +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_ctor_set(x_9, 0, x_13); +return x_9; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_13, 0); +x_16 = lean_ctor_get(x_13, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_13); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +lean_ctor_set(x_9, 0, x_17); +return x_9; +} +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_18 = lean_ctor_get(x_9, 0); +lean_inc(x_18); +lean_dec(x_9); +x_19 = lean_ctor_get(x_18, 1); +lean_inc(x_19); +lean_dec(x_18); +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +if (lean_is_exclusive(x_19)) { + lean_ctor_release(x_19, 0); + lean_ctor_release(x_19, 1); + x_22 = x_19; +} else { + lean_dec_ref(x_19); + x_22 = lean_box(0); +} +if (lean_is_scalar(x_22)) { + x_23 = lean_alloc_ctor(0, 2, 0); +} else { + x_23 = x_22; +} +lean_ctor_set(x_23, 0, x_20); +lean_ctor_set(x_23, 1, x_21); +x_24 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_24, 0, x_23); +return x_24; +} +} +} +} +lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +size_t x_5; size_t x_6; uint8_t x_7; lean_object* x_8; +x_5 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_6 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_7 = l_Array_anyMUnsafe_any___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__2(x_1, x_2, x_5, x_6); +lean_dec(x_2); +lean_dec(x_1); +x_8 = lean_box(x_7); +return x_8; +} +} +lean_object* l_Array_contains___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_Array_contains___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__1(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +size_t x_5; size_t x_6; lean_object* x_7; +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_7 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__5(x_1, x_5, x_6, x_4); +lean_dec(x_1); +return x_7; +} +} +lean_object* l_Array_getMax_x3f___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__4___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Array_getMax_x3f___at_Lean_Elab_InfoTree_hoverableTermAt_x3f___spec__4(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1(x_1, x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Elab_InfoTree(lean_object*); static bool _G_initialized = false; @@ -1300,6 +2271,24 @@ lean_dec_ref(res); res = initialize_Lean_Elab_InfoTree(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__1 = _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__1); +l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__2 = _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__2); +l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__3 = _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__3(); +lean_mark_persistent(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__3); +l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__4 = _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__4(); +lean_mark_persistent(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__4); +l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__5 = _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__5(); +lean_mark_persistent(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__5); +l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__6 = _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__6(); +lean_mark_persistent(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__6); +l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__7 = _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__7(); +lean_mark_persistent(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__7); +l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__8 = _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__8(); +lean_mark_persistent(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__8); +l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__9 = _init_l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__9(); +lean_mark_persistent(l_Lean_Elab_InfoTree_hoverableTermAt_x3f___lambda__1___closed__9); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Server/Watchdog.c b/stage0/stdlib/Lean/Server/Watchdog.c index 9a67bfdc49..6b0f472e15 100644 --- a/stage0/stdlib/Lean/Server/Watchdog.c +++ b/stage0/stdlib/Lean/Server/Watchdog.c @@ -14,7 +14,9 @@ extern "C" { #endif lean_object* l_Lean_Server_Watchdog_mainLoop_match__1(lean_object*); +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__40(size_t, size_t, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2___rarg(lean_object*, size_t, size_t, lean_object*); +lean_object* l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__3; lean_object* lean_string_push(lean_object*, uint32_t); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -28,6 +30,7 @@ lean_object* l_Lean_Server_Watchdog_runClientTask_match__1(lean_object*); lean_object* l_Lean_Server_Watchdog_shutdown_match__3___rarg(lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2(lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_get_stdin(lean_object*); lean_object* l_IO_FS_Stream_writeLspRequest___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(lean_object*, lean_object*, lean_object*); @@ -36,6 +39,7 @@ lean_object* l_Std_RBNode_insert___at_Lean_Server_Watchdog_updateFileWorkers___s lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_88_(lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleDidChange___spec__3(lean_object*); @@ -51,7 +55,6 @@ lean_object* lean_io_error_to_string(lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_Watchdog_log___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest___closed__2; lean_object* l_Lean_Server_Watchdog_handleNotification___closed__1; lean_object* l_Array_append___rarg(lean_object*, lean_object*); @@ -63,6 +66,7 @@ lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_ha lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Lsp_Ipc_collectDiagnostics___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__3; +lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__37(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleDidChange___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__5; extern lean_object* l_Lean_Lsp_Ipc_ipcStdioConfig___closed__1; @@ -85,6 +89,7 @@ lean_object* l_Lean_Server_Watchdog_shutdown_match__3___boxed(lean_object*, lean lean_object* l_Lean_Json_toStructured_x3f___rarg(lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleCancelRequest___spec__6(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog_match__2(lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__4___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; @@ -121,21 +126,25 @@ lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMes lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__3(lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop_match__1___boxed(lean_object*, lean_object*); lean_object* l_IO_throwServerError___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_startFileWorker___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__5; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst_match__1(lean_object*); +lean_object* l_Lean_Server_Watchdog_handleRequest___closed__7; lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_startFileWorker___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readLspNotificationAs___at_Lean_Server_Watchdog_initAndRunWatchdogAux___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_process_spawn(lean_object*, lean_object*); lean_object* lean_io_getenv(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__24; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__18___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_handleRequest___closed__5; lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__4; uint8_t l_USize_decLt(size_t, size_t); lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_Watchdog_initAndRunWatchdog___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readMessage(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__7___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdogAux___closed__2; @@ -146,6 +155,7 @@ lean_object* l_Lean_Server_Watchdog_handleDidChange_match__1___rarg(lean_object* lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_Watchdog_mainLoop___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest___closed__3; lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleDidChange___spec__4(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_shutdown___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -162,8 +172,8 @@ lean_object* l_Lean_Server_Watchdog_handleDidChange(lean_object*, lean_object*, lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage_match__1(lean_object*); lean_object* l_Lean_Server_Watchdog_findFileWorker_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleDidChange___spec__4___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__39(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__5; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_as_task(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__3; lean_object* l_Std_RBNode_erase___at_Lean_Server_Watchdog_eraseFileWorker___spec__1(lean_object*, lean_object*); @@ -181,11 +191,13 @@ uint8_t l_instDecidableNot___rarg(uint8_t); extern lean_object* l_Lean_Parser_Command_initialize___elambda__1___closed__1; lean_object* l_Lean_Server_Watchdog_runClientTask___closed__1; lean_object* l_Lean_Server_Watchdog_handleDidClose(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop_match__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__7; lean_object* l_Lean_Json_compress(lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_exit___elambda__1___closed__1; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages___lambda__1(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__1(lean_object*, lean_object*); @@ -195,6 +207,7 @@ lean_object* l_IO_FS_Stream_readNotificationAs___at_Lean_Server_Watchdog_initAnd lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_runClientTask___closed__2; lean_object* l_Lean_Server_Watchdog_shutdown_match__2___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__1(lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop___closed__2; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__7; @@ -202,6 +215,7 @@ lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___boxed(lean_object*, size_t l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__39___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__4; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__4; lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); @@ -228,6 +242,7 @@ lean_object* l_Std_RBNode_balRight___rarg(lean_object*, lean_object*, lean_objec lean_object* l_Lean_Server_Watchdog_FileWorker_writeMessage(lean_object*, lean_object*, lean_object*); uint8_t l_Std_RBNode_isBlack___rarg(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__8; +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__4(lean_object*); @@ -237,6 +252,7 @@ lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonCancelParams____x lean_object* lean_task_map(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_Watchdog_handleNotification___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_errorPendingRequests_match__2___boxed(lean_object*, lean_object*); +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__40___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readRequestAs___closed__5; lean_object* l_IO_FS_Stream_writeLspResponseError(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -253,11 +269,13 @@ lean_object* l_Lean_Server_Watchdog_shutdown_match__3(lean_object*, lean_object* lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__4(lean_object*); lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleDidChange___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_handleRequest___closed__6; lean_object* l_Lean_Server_Watchdog_handleCrash(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdogAux___closed__1; lean_object* l_Lean_Server_Watchdog_FileWorker_errorPendingRequests_match__2(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1265_(lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2; +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleCancelRequest___spec__7(size_t, size_t, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__14(size_t, size_t, lean_object*); @@ -271,15 +289,18 @@ lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_ha lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__2; lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParam____x40_Lean_Data_Lsp_Extra___hyg_32_(lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_errorPendingRequests_match__2___rarg(lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(size_t, size_t, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_stdout(lean_object*); lean_object* lean_server_watchdog_main(lean_object*, lean_object*); lean_object* l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__1(lean_object*, lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_Watchdog_startFileWorker___spec__2___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification_match__1(lean_object*); -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125_(lean_object*); +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239_(lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__6(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonCancelParams____x40_Lean_Data_Lsp_Basic___hyg_84_(lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages___lambda__1___boxed(lean_object*); lean_object* l_Lean_Server_Watchdog_shutdown_match__1(lean_object*); @@ -288,7 +309,6 @@ lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_ha uint8_t l_Array_isEmpty___rarg(lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__10(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__18(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__44; lean_object* l_Lean_FileMap_ofString(lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_Watchdog_initAndRunWatchdog___spec__4(lean_object*, lean_object*, lean_object*); @@ -296,12 +316,14 @@ lean_object* l_Std_RBNode_balLeft___rarg(lean_object*, lean_object*, lean_object lean_object* l_Lean_Server_Watchdog_FileWorker_errorPendingRequests___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Task_Priority_default; lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleDidChange___spec__4___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_439_(lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__19___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_watchdogMain___boxed__const__1; size_t lean_usize_of_nat(lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -311,24 +333,29 @@ lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__3___boxed(lean_ob lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_Watchdog_initAndRunWatchdog___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams_match__1(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__36; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__1; +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2; extern lean_object* l_IO_FS_Stream_readNotificationAs___closed__1; lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3(lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__6; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__19(size_t, size_t, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__17(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_del___at_Lean_Server_Watchdog_eraseFileWorker___spec__2(lean_object*, lean_object*); lean_object* l_Std_RBNode_fold___at_Lean_Server_Watchdog_mainLoop___spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__2; +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(size_t, size_t, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleDidChange___spec__4___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdogAux_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_shutdown(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__2; lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_startFileWorker___spec__7(lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__11(lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities; lean_object* l_List_redLength___rarg(lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_match__1(lean_object*); @@ -337,12 +364,17 @@ lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__1(lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__5___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop_match__1(lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2; +lean_object* l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__4; lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1; lean_object* l_Lean_Server_Watchdog_handleNotification_match__1___rarg___closed__1; lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__23(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__12; lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__8; lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__16(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleDidChange_match__2___rarg(lean_object*, lean_object*, lean_object*); @@ -354,8 +386,9 @@ lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___ lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_startFileWorker___spec__1___boxed(lean_object*, lean_object*, lean_object*); uint8_t l_Std_RBNode_isRed___rarg(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__32; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_275_(lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__1; +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop_match__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_tryWriteMessage___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__20; @@ -367,8 +400,10 @@ lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage_match__2(lean_object* lean_object* l_Lean_Server_Watchdog_runClientTask___lambda__2(lean_object*); lean_object* l_Std_RBNode_find___at_Lean_Server_Watchdog_findFileWorker___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__2(lean_object*); +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(size_t, size_t, lean_object*); lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_Watchdog_log___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleCancelRequest___spec__7___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_get_stdout(lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3___rarg(lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__1; @@ -377,6 +412,9 @@ extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__4; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__40; lean_object* l_Lean_Server_Watchdog_handleDidChange___closed__2; lean_object* l_Lean_Server_Watchdog_watchdogMain___closed__1; +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__2; lean_object* l_Lean_Json_mkObj(lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_Watchdog_startFileWorker___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_getBuiltinSearchPath___closed__4; @@ -384,13 +422,14 @@ extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__11; lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleDidChange___spec__6___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_stdin(lean_object*); lean_object* l_Lean_Server_Watchdog_shutdown_match__2(lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readRequestAs___closed__2; +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_updateFileWorkers(lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCrash___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__8; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__1; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog_match__1(lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop_match__2___rarg___closed__1; @@ -398,17 +437,19 @@ extern lean_object* l_IO_FS_Stream_readRequestAs___closed__1; lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__15(lean_object*, lean_object*, lean_object*); lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readLspRequestAs___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__2; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_shutdown_match__4(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_findFileWorker___closed__1; lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_runClientTask_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_foldDocumentChanges(lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleDidChange___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_63_(lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1; lean_object* l_Lean_Server_Watchdog_handleDidChange___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__2; @@ -416,52 +457,63 @@ lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequ lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__4(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_updateFileWorkers___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__3; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__4; extern lean_object* l_prec_x28___x29___closed__7; +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification(lean_object*); lean_object* l_Lean_Server_Watchdog_findFileWorker___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__1; extern lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__1; extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165____closed__2; lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__2___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleDidChange___spec__6(size_t, size_t, lean_object*); extern lean_object* l_Lean_mkOptionalNode___closed__2; +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage(lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__30(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_maybeTee(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* lean_io_app_dir(lean_object*); +lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__31(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__1; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_155_(lean_object*); +lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_269_(lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_tryWriteMessage___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_FileWorker_errorPendingRequests___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__13; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_System_FilePath_exeSuffix; lean_object* l_Lean_Server_Watchdog_handleCancelRequest(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_log(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; lean_object* l_Std_RBNode_ins___at_Lean_Server_Watchdog_updateFileWorkers___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_309_(lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop_match__2(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__12; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdogAux_match__1(lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleDidChange___spec__4___closed__2; +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleDidChange___spec__5(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_165_(lean_object*); +lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__24(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjVal_x3f(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__9; +lean_object* l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__5; uint8_t l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__1(lean_object*); @@ -469,9 +521,10 @@ lean_object* l_Lean_Server_Watchdog_shutdown_match__4___rarg(lean_object*); lean_object* lean_task_pure(lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_Watchdog_mainLoop___spec__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_findFileWorker(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleDidChange___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_handleRequest_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_startFileWorker___spec__1(size_t, size_t, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__3___rarg(lean_object*); @@ -479,12 +532,15 @@ lean_object* l_Lean_Server_Watchdog_handleDidChange___lambda__1___closed__2; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop_match__2(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspNotification___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleDidChange___lambda__1___closed__1; +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__2___closed__1; lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeResult____x40_Lean_Data_Lsp_InitShutdown___hyg_395_(lean_object*); uint8_t l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29___boxed(lean_object*, lean_object*, lean_object*); uint8_t lean_string_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleDidChange___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog_match__2___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36(lean_object*, lean_object*, lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); lean_object* l_Std_RBNode_erase___at_Lean_Server_Watchdog_FileWorker_readMessage___spec__1(lean_object*, lean_object*); lean_object* l_Std_RBNode_del___at_Lean_Server_Watchdog_eraseFileWorker___spec__2___boxed(lean_object*, lean_object*); @@ -494,6 +550,7 @@ lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___boxed(lean_ lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_runClientTask___lambda__2___boxed(lean_object*); +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(lean_object*); static lean_object* _init_l_Lean_Server_Watchdog_workerCfg() { _start: { @@ -10906,66 +10963,150 @@ static lean_object* _init_l_Lean_Server_Watchdog_handleRequest_match__1___rarg__ _start: { lean_object* x_1; +x_1 = lean_mk_string("textDocument/declaration"); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("textDocument/definition"); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("textDocument/typeDefinition"); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__5() { +_start: +{ +lean_object* x_1; x_1 = lean_mk_string("textDocument/documentSymbol"); return x_1; } } -lean_object* l_Lean_Server_Watchdog_handleRequest_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Server_Watchdog_handleRequest_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_6; uint8_t x_7; -x_6 = l_Lean_Lsp_Ipc_collectDiagnostics___closed__1; -x_7 = lean_string_dec_eq(x_1, x_6); -if (x_7 == 0) +lean_object* x_9; uint8_t x_10; +x_9 = l_Lean_Lsp_Ipc_collectDiagnostics___closed__1; +x_10 = lean_string_dec_eq(x_1, x_9); +if (x_10 == 0) { -lean_object* x_8; uint8_t x_9; +lean_object* x_11; uint8_t x_12; lean_dec(x_2); -x_8 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__1; -x_9 = lean_string_dec_eq(x_1, x_8); -if (x_9 == 0) +x_11 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__1; +x_12 = lean_string_dec_eq(x_1, x_11); +if (x_12 == 0) { -lean_object* x_10; uint8_t x_11; +lean_object* x_13; uint8_t x_14; lean_dec(x_3); -x_10 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__2; -x_11 = lean_string_dec_eq(x_1, x_10); -if (x_11 == 0) +x_13 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__2; +x_14 = lean_string_dec_eq(x_1, x_13); +if (x_14 == 0) { -lean_object* x_12; +lean_object* x_15; uint8_t x_16; lean_dec(x_4); -x_12 = lean_apply_1(x_5, x_1); -return x_12; +x_15 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__3; +x_16 = lean_string_dec_eq(x_1, x_15); +if (x_16 == 0) +{ +lean_object* x_17; uint8_t x_18; +lean_dec(x_5); +x_17 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__4; +x_18 = lean_string_dec_eq(x_1, x_17); +if (x_18 == 0) +{ +lean_object* x_19; uint8_t x_20; +lean_dec(x_6); +x_19 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__5; +x_20 = lean_string_dec_eq(x_1, x_19); +if (x_20 == 0) +{ +lean_object* x_21; +lean_dec(x_7); +x_21 = lean_apply_1(x_8, x_1); +return x_21; } else { -lean_object* x_13; lean_object* x_14; +lean_object* x_22; lean_object* x_23; +lean_dec(x_8); +lean_dec(x_1); +x_22 = lean_box(0); +x_23 = lean_apply_1(x_7, x_22); +return x_23; +} +} +else +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_24 = lean_box(0); +x_25 = lean_apply_1(x_6, x_24); +return x_25; +} +} +else +{ +lean_object* x_26; lean_object* x_27; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_26 = lean_box(0); +x_27 = lean_apply_1(x_5, x_26); +return x_27; +} +} +else +{ +lean_object* x_28; lean_object* x_29; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_1); -x_13 = lean_box(0); -x_14 = lean_apply_1(x_4, x_13); -return x_14; +x_28 = lean_box(0); +x_29 = lean_apply_1(x_4, x_28); +return x_29; } } else { -lean_object* x_15; lean_object* x_16; +lean_object* x_30; lean_object* x_31; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); -x_15 = lean_box(0); -x_16 = lean_apply_1(x_3, x_15); -return x_16; +x_30 = lean_box(0); +x_31 = lean_apply_1(x_3, x_30); +return x_31; } } else { -lean_object* x_17; lean_object* x_18; +lean_object* x_32; lean_object* x_33; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); -x_17 = lean_box(0); -x_18 = lean_apply_1(x_2, x_17); -return x_18; +x_32 = lean_box(0); +x_33 = lean_apply_1(x_2, x_32); +return x_33; } } } @@ -10973,7 +11114,7 @@ lean_object* l_Lean_Server_Watchdog_handleRequest_match__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_handleRequest_match__1___rarg), 5, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_handleRequest_match__1___rarg), 8, 0); return x_2; } } @@ -10981,7 +11122,7 @@ lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handle _start: { lean_object* x_4; -x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_125_(x_1); +x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_239_(x_1); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -11012,7 +11153,7 @@ lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleReques _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_155_(x_1); +x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_269_(x_1); x_3 = lean_ctor_get(x_2, 0); lean_inc(x_3); lean_dec(x_2); @@ -12233,7 +12374,7 @@ lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handle _start: { lean_object* x_4; -x_4 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParam____x40_Lean_Data_Lsp_Extra___hyg_32_(x_1); +x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(x_1); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -12260,6 +12401,42 @@ return x_12; } } } +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1265_(x_1); +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +lean_dec(x_2); +x_4 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_4, 0, x_3); +x_5 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_5, 0, x_4); +return x_5; +} +} +lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__17(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_4 = lean_ctor_get(x_2, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_2, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_2, 2); +lean_inc(x_6); +lean_dec(x_2); +x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(x_6); +x_8 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_8, 0, x_4); +lean_ctor_set(x_8, 1, x_5); +lean_ctor_set(x_8, 2, x_7); +x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); +lean_dec(x_8); +return x_9; +} +} lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__16(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -12267,7 +12444,7 @@ lean_object* x_4; lean_object* x_5; lean_inc(x_1); x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Lsp_Ipc_collectDiagnostics___spec__2(x_4, x_2, x_3); +x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__17(x_4, x_2, x_3); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; @@ -12290,7 +12467,7 @@ lean_inc(x_12); x_13 = lean_ctor_get(x_2, 2); lean_inc(x_13); lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(x_13); +x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(x_13); lean_inc(x_11); x_15 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_15, 0, x_11); @@ -12344,7 +12521,7 @@ return x_25; } } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__18(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { uint8_t x_8; @@ -12394,7 +12571,7 @@ goto _start; } } } -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__19(size_t x_1, size_t x_2, lean_object* x_3) { +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(size_t x_1, size_t x_2, lean_object* x_3) { _start: { uint8_t x_4; @@ -12419,7 +12596,7 @@ lean_inc(x_11); x_12 = lean_ctor_get(x_9, 2); lean_inc(x_12); lean_dec(x_9); -x_13 = l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(x_12); +x_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(x_12); x_14 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_14, 0, x_10); lean_ctor_set(x_14, 1, x_11); @@ -12434,7 +12611,7 @@ goto _start; } } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; @@ -12470,7 +12647,7 @@ x_17 = lean_usize_of_nat(x_16); lean_dec(x_16); x_18 = 0; x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__18(x_14, x_3, x_17, x_18, x_19, x_5, x_15); +x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20(x_14, x_3, x_17, x_18, x_19, x_5, x_15); x_21 = !lean_is_exclusive(x_20); if (x_21 == 0) { @@ -12629,7 +12806,7 @@ return x_49; } } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { if (x_1 == 0) @@ -12647,32 +12824,32 @@ else { lean_object* x_10; lean_object* x_11; x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); +x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); return x_11; } } } -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__1() { +static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1() { _start: { size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; x_1 = 0; x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__19(x_2, x_1, x_3); +x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(x_2, x_1, x_3); return x_4; } } -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__2() { +static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__1; +x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1; x_2 = x_1; return x_2; } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; @@ -12698,7 +12875,7 @@ x_12 = lean_ctor_get(x_10, 0); lean_inc(x_12); lean_dec(x_10); x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); +x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); lean_dec(x_12); return x_14; } @@ -12718,14 +12895,14 @@ lean_inc(x_18); x_19 = lean_ctor_get(x_2, 2); lean_inc(x_19); lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(x_19); +x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(x_19); x_21 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_21, 0, x_17); lean_ctor_set(x_21, 1, x_18); lean_ctor_set(x_21, 2, x_20); x_22 = lean_array_push(x_16, x_21); x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); +x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); lean_dec(x_22); return x_24; } @@ -12750,7 +12927,7 @@ lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_26, 1); lean_inc(x_27); lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__2; +x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2; x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); lean_dec(x_6); return x_29; @@ -12783,7 +12960,1849 @@ x_36 = lean_usize_of_nat(x_35); lean_dec(x_35); x_37 = 0; x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__19(x_36, x_37, x_38); +x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(x_36, x_37, x_38); +x_40 = x_39; +x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); +lean_dec(x_6); +return x_41; +} +} +} +} +else +{ +uint8_t x_42; +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +x_42 = !lean_is_exclusive(x_8); +if (x_42 == 0) +{ +return x_8; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_8, 0); +x_44 = lean_ctor_get(x_8, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_8); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(x_1); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_5 = l_Lean_Json_compress(x_1); +x_6 = l_Lean_Server_Watchdog_parseParams___rarg___closed__1; +x_7 = lean_string_append(x_6, x_5); +lean_dec(x_5); +x_8 = l_Lean_instInhabitedParserDescr___closed__1; +x_9 = lean_string_append(x_7, x_8); +x_10 = l_IO_throwServerError___rarg(x_9, x_3); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; +lean_dec(x_1); +x_11 = lean_ctor_get(x_4, 0); +lean_inc(x_11); +lean_dec(x_4); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_3); +return x_12; +} +} +} +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1265_(x_1); +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +lean_dec(x_2); +x_4 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_4, 0, x_3); +x_5 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_5, 0, x_4); +return x_5; +} +} +lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__24(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_4 = lean_ctor_get(x_2, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_2, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_2, 2); +lean_inc(x_6); +lean_dec(x_2); +x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(x_6); +x_8 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_8, 0, x_4); +lean_ctor_set(x_8, 1, x_5); +lean_ctor_set(x_8, 2, x_7); +x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); +lean_dec(x_8); +return x_9; +} +} +lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__23(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +lean_inc(x_1); +x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); +lean_inc(x_2); +x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__24(x_4, x_2, x_3); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_6 = lean_ctor_get(x_5, 1); +lean_inc(x_6); +lean_dec(x_5); +x_7 = lean_ctor_get(x_1, 4); +lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_st_ref_take(x_7, x_6); +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +x_11 = lean_ctor_get(x_2, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_2, 1); +lean_inc(x_12); +x_13 = lean_ctor_get(x_2, 2); +lean_inc(x_13); +lean_dec(x_2); +x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(x_13); +lean_inc(x_11); +x_15 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_15, 0, x_11); +lean_ctor_set(x_15, 1, x_12); +lean_ctor_set(x_15, 2, x_14); +x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); +x_17 = lean_st_ref_set(x_7, x_16, x_10); +lean_dec(x_7); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +return x_17; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_17); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +else +{ +uint8_t x_22; +lean_dec(x_2); +lean_dec(x_1); +x_22 = !lean_is_exclusive(x_5); +if (x_22 == 0) +{ +return x_5; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +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; +} +} +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; +x_8 = x_4 < x_3; +if (x_8 == 0) +{ +lean_object* x_9; +lean_dec(x_1); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_5); +lean_ctor_set(x_9, 1, x_7); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_array_uget(x_2, x_4); +lean_inc(x_1); +x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; size_t x_13; size_t x_14; +lean_dec(x_10); +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +x_13 = 1; +x_14 = x_4 + x_13; +x_4 = x_14; +x_7 = x_12; +goto _start; +} +else +{ +lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; +x_16 = lean_ctor_get(x_11, 1); +lean_inc(x_16); +lean_dec(x_11); +x_17 = lean_array_push(x_5, x_10); +x_18 = 1; +x_19 = x_4 + x_18; +x_4 = x_19; +x_5 = x_17; +x_7 = x_16; +goto _start; +} +} +} +} +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(size_t x_1, size_t x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = x_2 < x_1; +if (x_4 == 0) +{ +lean_object* x_5; +x_5 = x_3; +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; +x_6 = lean_array_uget(x_3, x_2); +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_array_uset(x_3, x_2, x_7); +x_9 = x_6; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +x_12 = lean_ctor_get(x_9, 2); +lean_inc(x_12); +lean_dec(x_9); +x_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(x_12); +x_14 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_14, 0, x_10); +lean_ctor_set(x_14, 1, x_11); +lean_ctor_set(x_14, 2, x_13); +x_15 = 1; +x_16 = x_2 + x_15; +x_17 = x_14; +x_18 = lean_array_uset(x_8, x_2, x_17); +x_2 = x_16; +x_3 = x_18; +goto _start; +} +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +lean_dec(x_7); +x_9 = lean_ctor_get(x_2, 0); +lean_inc(x_9); +lean_dec(x_2); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +lean_dec(x_9); +lean_inc(x_5); +x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_array_get_size(x_3); +x_17 = lean_usize_of_nat(x_16); +lean_dec(x_16); +x_18 = 0; +x_19 = l_Array_empty___closed__1; +x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27(x_14, x_3, x_17, x_18, x_19, x_5, x_15); +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_22 = lean_ctor_get(x_20, 0); +x_23 = lean_ctor_get(x_20, 1); +x_24 = l_Array_isEmpty___rarg(x_22); +if (x_24 == 0) +{ +uint8_t x_25; +x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; +if (x_25 == 0) +{ +lean_object* x_26; +lean_dec(x_22); +lean_dec(x_5); +x_26 = lean_box(0); +lean_ctor_set(x_20, 0, x_26); +return x_20; +} +else +{ +lean_object* x_27; +lean_free_object(x_20); +x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); +lean_dec(x_5); +return x_27; +} +} +else +{ +uint8_t x_28; +x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; +if (x_28 == 0) +{ +lean_object* x_29; +lean_dec(x_22); +lean_dec(x_5); +x_29 = lean_box(0); +lean_ctor_set(x_20, 0, x_29); +return x_20; +} +else +{ +lean_object* x_30; +lean_free_object(x_20); +x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); +lean_dec(x_5); +return x_30; +} +} +} +else +{ +lean_object* x_31; lean_object* x_32; uint8_t x_33; +x_31 = lean_ctor_get(x_20, 0); +x_32 = lean_ctor_get(x_20, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_20); +x_33 = l_Array_isEmpty___rarg(x_31); +if (x_33 == 0) +{ +uint8_t x_34; +x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; +if (x_34 == 0) +{ +lean_object* x_35; lean_object* x_36; +lean_dec(x_31); +lean_dec(x_5); +x_35 = lean_box(0); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_32); +return x_36; +} +else +{ +lean_object* x_37; +x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); +lean_dec(x_5); +return x_37; +} +} +else +{ +uint8_t x_38; +x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; +lean_dec(x_31); +lean_dec(x_5); +x_39 = lean_box(0); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_32); +return x_40; +} +else +{ +lean_object* x_41; +x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); +lean_dec(x_5); +return x_41; +} +} +} +} +else +{ +uint8_t x_42; +lean_dec(x_5); +x_42 = !lean_is_exclusive(x_13); +if (x_42 == 0) +{ +return x_13; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_13, 0); +x_44 = lean_ctor_get(x_13, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_13); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +else +{ +uint8_t x_46; +lean_dec(x_5); +x_46 = !lean_is_exclusive(x_11); +if (x_46 == 0) +{ +return x_11; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_11, 0); +x_48 = lean_ctor_get(x_11, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_11); +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +if (x_1 == 0) +{ +lean_object* x_8; lean_object* x_9; +lean_dec(x_6); +lean_dec(x_3); +x_8 = lean_box(0); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_7); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_box(0); +x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); +return x_11; +} +} +} +static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1() { +_start: +{ +size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; +x_1 = 0; +x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; +x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; +x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(x_2, x_1, x_3); +return x_4; +} +} +static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1; +x_2 = x_1; +return x_2; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_9, 3); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 0) +{ +lean_dec(x_3); +if (x_4 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +lean_dec(x_2); +x_11 = lean_ctor_get(x_8, 1); +lean_inc(x_11); +lean_dec(x_8); +x_12 = lean_ctor_get(x_10, 0); +lean_inc(x_12); +lean_dec(x_10); +x_13 = lean_box(0); +x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); +lean_dec(x_12); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_15 = lean_ctor_get(x_8, 1); +lean_inc(x_15); +lean_dec(x_8); +x_16 = lean_ctor_get(x_10, 0); +lean_inc(x_16); +lean_dec(x_10); +x_17 = lean_ctor_get(x_2, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_2, 1); +lean_inc(x_18); +x_19 = lean_ctor_get(x_2, 2); +lean_inc(x_19); +lean_dec(x_2); +x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(x_19); +x_21 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_21, 0, x_17); +lean_ctor_set(x_21, 1, x_18); +lean_ctor_set(x_21, 2, x_20); +x_22 = lean_array_push(x_16, x_21); +x_23 = lean_box(0); +x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); +lean_dec(x_22); +return x_24; +} +} +else +{ +if (x_4 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_8, 1); +lean_inc(x_25); +lean_dec(x_8); +x_26 = lean_apply_3(x_3, x_9, x_2, x_25); +if (lean_obj_tag(x_26) == 0) +{ +lean_dec(x_6); +return x_26; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_26, 1); +lean_inc(x_27); +lean_dec(x_26); +x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2; +x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); +lean_dec(x_6); +return x_29; +} +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_8, 1); +lean_inc(x_30); +lean_dec(x_8); +x_31 = l_Lean_mkOptionalNode___closed__2; +lean_inc(x_2); +x_32 = lean_array_push(x_31, x_2); +x_33 = lean_apply_3(x_3, x_9, x_2, x_30); +if (lean_obj_tag(x_33) == 0) +{ +lean_dec(x_32); +lean_dec(x_6); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_34 = lean_ctor_get(x_33, 1); +lean_inc(x_34); +lean_dec(x_33); +x_35 = lean_array_get_size(x_32); +x_36 = lean_usize_of_nat(x_35); +lean_dec(x_35); +x_37 = 0; +x_38 = x_32; +x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(x_36, x_37, x_38); +x_40 = x_39; +x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); +lean_dec(x_6); +return x_41; +} +} +} +} +else +{ +uint8_t x_42; +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +x_42 = !lean_is_exclusive(x_8); +if (x_42 == 0) +{ +return x_8; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_8, 0); +x_44 = lean_ctor_get(x_8, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_8); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1299_(x_1); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_5 = l_Lean_Json_compress(x_1); +x_6 = l_Lean_Server_Watchdog_parseParams___rarg___closed__1; +x_7 = lean_string_append(x_6, x_5); +lean_dec(x_5); +x_8 = l_Lean_instInhabitedParserDescr___closed__1; +x_9 = lean_string_append(x_7, x_8); +x_10 = l_IO_throwServerError___rarg(x_9, x_3); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; +lean_dec(x_1); +x_11 = lean_ctor_get(x_4, 0); +lean_inc(x_11); +lean_dec(x_4); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_3); +return x_12; +} +} +} +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1265_(x_1); +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +lean_dec(x_2); +x_4 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_4, 0, x_3); +x_5 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_5, 0, x_4); +return x_5; +} +} +lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__31(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_4 = lean_ctor_get(x_2, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_2, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_2, 2); +lean_inc(x_6); +lean_dec(x_2); +x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(x_6); +x_8 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_8, 0, x_4); +lean_ctor_set(x_8, 1, x_5); +lean_ctor_set(x_8, 2, x_7); +x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); +lean_dec(x_8); +return x_9; +} +} +lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__30(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +lean_inc(x_1); +x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); +lean_inc(x_2); +x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__31(x_4, x_2, x_3); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_6 = lean_ctor_get(x_5, 1); +lean_inc(x_6); +lean_dec(x_5); +x_7 = lean_ctor_get(x_1, 4); +lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_st_ref_take(x_7, x_6); +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +x_11 = lean_ctor_get(x_2, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_2, 1); +lean_inc(x_12); +x_13 = lean_ctor_get(x_2, 2); +lean_inc(x_13); +lean_dec(x_2); +x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(x_13); +lean_inc(x_11); +x_15 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_15, 0, x_11); +lean_ctor_set(x_15, 1, x_12); +lean_ctor_set(x_15, 2, x_14); +x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); +x_17 = lean_st_ref_set(x_7, x_16, x_10); +lean_dec(x_7); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +return x_17; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_17); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +else +{ +uint8_t x_22; +lean_dec(x_2); +lean_dec(x_1); +x_22 = !lean_is_exclusive(x_5); +if (x_22 == 0) +{ +return x_5; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +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; +} +} +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; +x_8 = x_4 < x_3; +if (x_8 == 0) +{ +lean_object* x_9; +lean_dec(x_1); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_5); +lean_ctor_set(x_9, 1, x_7); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_array_uget(x_2, x_4); +lean_inc(x_1); +x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; size_t x_13; size_t x_14; +lean_dec(x_10); +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +x_13 = 1; +x_14 = x_4 + x_13; +x_4 = x_14; +x_7 = x_12; +goto _start; +} +else +{ +lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; +x_16 = lean_ctor_get(x_11, 1); +lean_inc(x_16); +lean_dec(x_11); +x_17 = lean_array_push(x_5, x_10); +x_18 = 1; +x_19 = x_4 + x_18; +x_4 = x_19; +x_5 = x_17; +x_7 = x_16; +goto _start; +} +} +} +} +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(size_t x_1, size_t x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = x_2 < x_1; +if (x_4 == 0) +{ +lean_object* x_5; +x_5 = x_3; +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; +x_6 = lean_array_uget(x_3, x_2); +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_array_uset(x_3, x_2, x_7); +x_9 = x_6; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +x_12 = lean_ctor_get(x_9, 2); +lean_inc(x_12); +lean_dec(x_9); +x_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(x_12); +x_14 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_14, 0, x_10); +lean_ctor_set(x_14, 1, x_11); +lean_ctor_set(x_14, 2, x_13); +x_15 = 1; +x_16 = x_2 + x_15; +x_17 = x_14; +x_18 = lean_array_uset(x_8, x_2, x_17); +x_2 = x_16; +x_3 = x_18; +goto _start; +} +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +lean_dec(x_7); +x_9 = lean_ctor_get(x_2, 0); +lean_inc(x_9); +lean_dec(x_2); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +lean_dec(x_9); +lean_inc(x_5); +x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_array_get_size(x_3); +x_17 = lean_usize_of_nat(x_16); +lean_dec(x_16); +x_18 = 0; +x_19 = l_Array_empty___closed__1; +x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34(x_14, x_3, x_17, x_18, x_19, x_5, x_15); +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_22 = lean_ctor_get(x_20, 0); +x_23 = lean_ctor_get(x_20, 1); +x_24 = l_Array_isEmpty___rarg(x_22); +if (x_24 == 0) +{ +uint8_t x_25; +x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; +if (x_25 == 0) +{ +lean_object* x_26; +lean_dec(x_22); +lean_dec(x_5); +x_26 = lean_box(0); +lean_ctor_set(x_20, 0, x_26); +return x_20; +} +else +{ +lean_object* x_27; +lean_free_object(x_20); +x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); +lean_dec(x_5); +return x_27; +} +} +else +{ +uint8_t x_28; +x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; +if (x_28 == 0) +{ +lean_object* x_29; +lean_dec(x_22); +lean_dec(x_5); +x_29 = lean_box(0); +lean_ctor_set(x_20, 0, x_29); +return x_20; +} +else +{ +lean_object* x_30; +lean_free_object(x_20); +x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); +lean_dec(x_5); +return x_30; +} +} +} +else +{ +lean_object* x_31; lean_object* x_32; uint8_t x_33; +x_31 = lean_ctor_get(x_20, 0); +x_32 = lean_ctor_get(x_20, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_20); +x_33 = l_Array_isEmpty___rarg(x_31); +if (x_33 == 0) +{ +uint8_t x_34; +x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; +if (x_34 == 0) +{ +lean_object* x_35; lean_object* x_36; +lean_dec(x_31); +lean_dec(x_5); +x_35 = lean_box(0); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_32); +return x_36; +} +else +{ +lean_object* x_37; +x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); +lean_dec(x_5); +return x_37; +} +} +else +{ +uint8_t x_38; +x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; +lean_dec(x_31); +lean_dec(x_5); +x_39 = lean_box(0); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_32); +return x_40; +} +else +{ +lean_object* x_41; +x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); +lean_dec(x_5); +return x_41; +} +} +} +} +else +{ +uint8_t x_42; +lean_dec(x_5); +x_42 = !lean_is_exclusive(x_13); +if (x_42 == 0) +{ +return x_13; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_13, 0); +x_44 = lean_ctor_get(x_13, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_13); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +else +{ +uint8_t x_46; +lean_dec(x_5); +x_46 = !lean_is_exclusive(x_11); +if (x_46 == 0) +{ +return x_11; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_11, 0); +x_48 = lean_ctor_get(x_11, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_11); +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +if (x_1 == 0) +{ +lean_object* x_8; lean_object* x_9; +lean_dec(x_6); +lean_dec(x_3); +x_8 = lean_box(0); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_7); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_box(0); +x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); +return x_11; +} +} +} +static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1() { +_start: +{ +size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; +x_1 = 0; +x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; +x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; +x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(x_2, x_1, x_3); +return x_4; +} +} +static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1; +x_2 = x_1; +return x_2; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_9, 3); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 0) +{ +lean_dec(x_3); +if (x_4 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +lean_dec(x_2); +x_11 = lean_ctor_get(x_8, 1); +lean_inc(x_11); +lean_dec(x_8); +x_12 = lean_ctor_get(x_10, 0); +lean_inc(x_12); +lean_dec(x_10); +x_13 = lean_box(0); +x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); +lean_dec(x_12); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_15 = lean_ctor_get(x_8, 1); +lean_inc(x_15); +lean_dec(x_8); +x_16 = lean_ctor_get(x_10, 0); +lean_inc(x_16); +lean_dec(x_10); +x_17 = lean_ctor_get(x_2, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_2, 1); +lean_inc(x_18); +x_19 = lean_ctor_get(x_2, 2); +lean_inc(x_19); +lean_dec(x_2); +x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(x_19); +x_21 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_21, 0, x_17); +lean_ctor_set(x_21, 1, x_18); +lean_ctor_set(x_21, 2, x_20); +x_22 = lean_array_push(x_16, x_21); +x_23 = lean_box(0); +x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); +lean_dec(x_22); +return x_24; +} +} +else +{ +if (x_4 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_8, 1); +lean_inc(x_25); +lean_dec(x_8); +x_26 = lean_apply_3(x_3, x_9, x_2, x_25); +if (lean_obj_tag(x_26) == 0) +{ +lean_dec(x_6); +return x_26; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_26, 1); +lean_inc(x_27); +lean_dec(x_26); +x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2; +x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); +lean_dec(x_6); +return x_29; +} +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_8, 1); +lean_inc(x_30); +lean_dec(x_8); +x_31 = l_Lean_mkOptionalNode___closed__2; +lean_inc(x_2); +x_32 = lean_array_push(x_31, x_2); +x_33 = lean_apply_3(x_3, x_9, x_2, x_30); +if (lean_obj_tag(x_33) == 0) +{ +lean_dec(x_32); +lean_dec(x_6); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_34 = lean_ctor_get(x_33, 1); +lean_inc(x_34); +lean_dec(x_33); +x_35 = lean_array_get_size(x_32); +x_36 = lean_usize_of_nat(x_35); +lean_dec(x_35); +x_37 = 0; +x_38 = x_32; +x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(x_36, x_37, x_38); +x_40 = x_39; +x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); +lean_dec(x_6); +return x_41; +} +} +} +} +else +{ +uint8_t x_42; +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +x_42 = !lean_is_exclusive(x_8); +if (x_42 == 0) +{ +return x_8; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_8, 0); +x_44 = lean_ctor_get(x_8, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_8); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParam____x40_Lean_Data_Lsp_Extra___hyg_32_(x_1); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_5 = l_Lean_Json_compress(x_1); +x_6 = l_Lean_Server_Watchdog_parseParams___rarg___closed__1; +x_7 = lean_string_append(x_6, x_5); +lean_dec(x_5); +x_8 = l_Lean_instInhabitedParserDescr___closed__1; +x_9 = lean_string_append(x_7, x_8); +x_10 = l_IO_throwServerError___rarg(x_9, x_3); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; +lean_dec(x_1); +x_11 = lean_ctor_get(x_4, 0); +lean_inc(x_11); +lean_dec(x_4); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_3); +return x_12; +} +} +} +lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__37(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +lean_inc(x_1); +x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); +lean_inc(x_2); +x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Lsp_Ipc_collectDiagnostics___spec__2(x_4, x_2, x_3); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_6 = lean_ctor_get(x_5, 1); +lean_inc(x_6); +lean_dec(x_5); +x_7 = lean_ctor_get(x_1, 4); +lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_st_ref_take(x_7, x_6); +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +x_11 = lean_ctor_get(x_2, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_2, 1); +lean_inc(x_12); +x_13 = lean_ctor_get(x_2, 2); +lean_inc(x_13); +lean_dec(x_2); +x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(x_13); +lean_inc(x_11); +x_15 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_15, 0, x_11); +lean_ctor_set(x_15, 1, x_12); +lean_ctor_set(x_15, 2, x_14); +x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); +x_17 = lean_st_ref_set(x_7, x_16, x_10); +lean_dec(x_7); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +return x_17; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_17); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +else +{ +uint8_t x_22; +lean_dec(x_2); +lean_dec(x_1); +x_22 = !lean_is_exclusive(x_5); +if (x_22 == 0) +{ +return x_5; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +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; +} +} +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__39(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; +x_8 = x_4 < x_3; +if (x_8 == 0) +{ +lean_object* x_9; +lean_dec(x_1); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_5); +lean_ctor_set(x_9, 1, x_7); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_array_uget(x_2, x_4); +lean_inc(x_1); +x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; size_t x_13; size_t x_14; +lean_dec(x_10); +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +x_13 = 1; +x_14 = x_4 + x_13; +x_4 = x_14; +x_7 = x_12; +goto _start; +} +else +{ +lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; +x_16 = lean_ctor_get(x_11, 1); +lean_inc(x_16); +lean_dec(x_11); +x_17 = lean_array_push(x_5, x_10); +x_18 = 1; +x_19 = x_4 + x_18; +x_4 = x_19; +x_5 = x_17; +x_7 = x_16; +goto _start; +} +} +} +} +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__40(size_t x_1, size_t x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = x_2 < x_1; +if (x_4 == 0) +{ +lean_object* x_5; +x_5 = x_3; +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; +x_6 = lean_array_uget(x_3, x_2); +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_array_uset(x_3, x_2, x_7); +x_9 = x_6; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +x_12 = lean_ctor_get(x_9, 2); +lean_inc(x_12); +lean_dec(x_9); +x_13 = l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(x_12); +x_14 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_14, 0, x_10); +lean_ctor_set(x_14, 1, x_11); +lean_ctor_set(x_14, 2, x_13); +x_15 = 1; +x_16 = x_2 + x_15; +x_17 = x_14; +x_18 = lean_array_uset(x_8, x_2, x_17); +x_2 = x_16; +x_3 = x_18; +goto _start; +} +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +lean_dec(x_7); +x_9 = lean_ctor_get(x_2, 0); +lean_inc(x_9); +lean_dec(x_2); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +lean_dec(x_9); +lean_inc(x_5); +x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_array_get_size(x_3); +x_17 = lean_usize_of_nat(x_16); +lean_dec(x_16); +x_18 = 0; +x_19 = l_Array_empty___closed__1; +x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__39(x_14, x_3, x_17, x_18, x_19, x_5, x_15); +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_22 = lean_ctor_get(x_20, 0); +x_23 = lean_ctor_get(x_20, 1); +x_24 = l_Array_isEmpty___rarg(x_22); +if (x_24 == 0) +{ +uint8_t x_25; +x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; +if (x_25 == 0) +{ +lean_object* x_26; +lean_dec(x_22); +lean_dec(x_5); +x_26 = lean_box(0); +lean_ctor_set(x_20, 0, x_26); +return x_20; +} +else +{ +lean_object* x_27; +lean_free_object(x_20); +x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); +lean_dec(x_5); +return x_27; +} +} +else +{ +uint8_t x_28; +x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; +if (x_28 == 0) +{ +lean_object* x_29; +lean_dec(x_22); +lean_dec(x_5); +x_29 = lean_box(0); +lean_ctor_set(x_20, 0, x_29); +return x_20; +} +else +{ +lean_object* x_30; +lean_free_object(x_20); +x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); +lean_dec(x_5); +return x_30; +} +} +} +else +{ +lean_object* x_31; lean_object* x_32; uint8_t x_33; +x_31 = lean_ctor_get(x_20, 0); +x_32 = lean_ctor_get(x_20, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_20); +x_33 = l_Array_isEmpty___rarg(x_31); +if (x_33 == 0) +{ +uint8_t x_34; +x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; +if (x_34 == 0) +{ +lean_object* x_35; lean_object* x_36; +lean_dec(x_31); +lean_dec(x_5); +x_35 = lean_box(0); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_32); +return x_36; +} +else +{ +lean_object* x_37; +x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); +lean_dec(x_5); +return x_37; +} +} +else +{ +uint8_t x_38; +x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; +lean_dec(x_31); +lean_dec(x_5); +x_39 = lean_box(0); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_32); +return x_40; +} +else +{ +lean_object* x_41; +x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); +lean_dec(x_5); +return x_41; +} +} +} +} +else +{ +uint8_t x_42; +lean_dec(x_5); +x_42 = !lean_is_exclusive(x_13); +if (x_42 == 0) +{ +return x_13; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_13, 0); +x_44 = lean_ctor_get(x_13, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_13); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +else +{ +uint8_t x_46; +lean_dec(x_5); +x_46 = !lean_is_exclusive(x_11); +if (x_46 == 0) +{ +return x_11; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_11, 0); +x_48 = lean_ctor_get(x_11, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_11); +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +if (x_1 == 0) +{ +lean_object* x_8; lean_object* x_9; +lean_dec(x_6); +lean_dec(x_3); +x_8 = lean_box(0); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_7); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_box(0); +x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); +return x_11; +} +} +} +static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__1() { +_start: +{ +size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; +x_1 = 0; +x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; +x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; +x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__40(x_2, x_1, x_3); +return x_4; +} +} +static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__1; +x_2 = x_1; +return x_2; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_9, 3); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 0) +{ +lean_dec(x_3); +if (x_4 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +lean_dec(x_2); +x_11 = lean_ctor_get(x_8, 1); +lean_inc(x_11); +lean_dec(x_8); +x_12 = lean_ctor_get(x_10, 0); +lean_inc(x_12); +lean_dec(x_10); +x_13 = lean_box(0); +x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); +lean_dec(x_12); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_15 = lean_ctor_get(x_8, 1); +lean_inc(x_15); +lean_dec(x_8); +x_16 = lean_ctor_get(x_10, 0); +lean_inc(x_16); +lean_dec(x_10); +x_17 = lean_ctor_get(x_2, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_2, 1); +lean_inc(x_18); +x_19 = lean_ctor_get(x_2, 2); +lean_inc(x_19); +lean_dec(x_2); +x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(x_19); +x_21 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_21, 0, x_17); +lean_ctor_set(x_21, 1, x_18); +lean_ctor_set(x_21, 2, x_20); +x_22 = lean_array_push(x_16, x_21); +x_23 = lean_box(0); +x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); +lean_dec(x_22); +return x_24; +} +} +else +{ +if (x_4 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_8, 1); +lean_inc(x_25); +lean_dec(x_8); +x_26 = lean_apply_3(x_3, x_9, x_2, x_25); +if (lean_obj_tag(x_26) == 0) +{ +lean_dec(x_6); +return x_26; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_26, 1); +lean_inc(x_27); +lean_dec(x_26); +x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__2; +x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); +lean_dec(x_6); +return x_29; +} +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_8, 1); +lean_inc(x_30); +lean_dec(x_8); +x_31 = l_Lean_mkOptionalNode___closed__2; +lean_inc(x_2); +x_32 = lean_array_push(x_31, x_2); +x_33 = lean_apply_3(x_3, x_9, x_2, x_30); +if (lean_obj_tag(x_33) == 0) +{ +lean_dec(x_32); +lean_dec(x_6); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_34 = lean_ctor_get(x_33, 1); +lean_inc(x_34); +lean_dec(x_33); +x_35 = lean_array_get_size(x_32); +x_36 = lean_usize_of_nat(x_35); +lean_dec(x_35); +x_37 = 0; +x_38 = x_32; +x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__40(x_36, x_37, x_38); x_40 = x_39; x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); lean_dec(x_6); @@ -12851,6 +14870,30 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest_ return x_1; } } +static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__23), 3, 0); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___closed__6() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__30), 3, 0); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__37), 3, 0); +return x_1; +} +} lean_object* l_Lean_Server_Watchdog_handleRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -12869,177 +14912,348 @@ x_10 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__2; x_11 = lean_string_dec_eq(x_2, x_10); if (x_11 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_12; uint8_t x_13; +x_12 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__3; +x_13 = lean_string_dec_eq(x_2, x_12); +if (x_13 == 0) +{ +lean_object* x_14; uint8_t x_15; +x_14 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__4; +x_15 = lean_string_dec_eq(x_2, x_14); +if (x_15 == 0) +{ +lean_object* x_16; uint8_t x_17; +x_16 = l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__5; +x_17 = lean_string_dec_eq(x_2, x_16); +if (x_17 == 0) +{ +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_dec(x_3); -x_12 = lean_ctor_get(x_4, 1); -lean_inc(x_12); +x_18 = lean_ctor_get(x_4, 1); +lean_inc(x_18); lean_dec(x_4); -x_13 = l_Lean_Server_Watchdog_handleRequest___closed__1; -x_14 = lean_string_append(x_13, x_2); +x_19 = l_Lean_Server_Watchdog_handleRequest___closed__1; +x_20 = lean_string_append(x_19, x_2); lean_dec(x_2); -x_15 = l_Lean_instInhabitedParserDescr___closed__1; -x_16 = lean_string_append(x_14, x_15); -x_17 = lean_box(0); -x_18 = 2; -x_19 = lean_alloc_ctor(0, 3, 1); -lean_ctor_set(x_19, 0, x_1); -lean_ctor_set(x_19, 1, x_16); -lean_ctor_set(x_19, 2, x_17); -lean_ctor_set_uint8(x_19, sizeof(void*)*3, x_18); -x_20 = l_IO_FS_Stream_writeLspResponseError(x_12, x_19, x_5); -lean_dec(x_19); -return x_20; +x_21 = l_Lean_instInhabitedParserDescr___closed__1; +x_22 = lean_string_append(x_20, x_21); +x_23 = lean_box(0); +x_24 = 2; +x_25 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_25, 0, x_1); +lean_ctor_set(x_25, 1, x_22); +lean_ctor_set(x_25, 2, x_23); +lean_ctor_set_uint8(x_25, sizeof(void*)*3, x_24); +x_26 = l_IO_FS_Stream_writeLspResponseError(x_18, x_25, x_5); +lean_dec(x_25); +return x_26; } else { -lean_object* x_21; -x_21 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__1(x_3, x_4, x_5); -if (lean_obj_tag(x_21) == 0) +lean_object* x_27; +x_27 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__1(x_3, x_4, x_5); +if (lean_obj_tag(x_27) == 0) { -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; uint8_t x_27; lean_object* x_28; -x_22 = lean_ctor_get(x_21, 0); -lean_inc(x_22); -x_23 = lean_ctor_get(x_21, 1); -lean_inc(x_23); -lean_dec(x_21); -lean_inc(x_22); -x_24 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_24, 0, x_1); -lean_ctor_set(x_24, 1, x_2); -lean_ctor_set(x_24, 2, x_22); -x_25 = l_Lean_Server_Watchdog_handleRequest___closed__2; -x_26 = 1; -x_27 = 0; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5(x_22, x_24, x_25, x_26, x_27, x_4, x_23); -lean_dec(x_22); -return x_28; +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; uint8_t x_33; lean_object* x_34; +x_28 = lean_ctor_get(x_27, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +lean_inc(x_28); +x_30 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_30, 0, x_1); +lean_ctor_set(x_30, 1, x_2); +lean_ctor_set(x_30, 2, x_28); +x_31 = l_Lean_Server_Watchdog_handleRequest___closed__2; +x_32 = 1; +x_33 = 0; +x_34 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5(x_28, x_30, x_31, x_32, x_33, x_4, x_29); +lean_dec(x_28); +return x_34; } else { -uint8_t x_29; +uint8_t x_35; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_29 = !lean_is_exclusive(x_21); -if (x_29 == 0) +x_35 = !lean_is_exclusive(x_27); +if (x_35 == 0) { -return x_21; +return x_27; } else { -lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_30 = lean_ctor_get(x_21, 0); -x_31 = lean_ctor_get(x_21, 1); -lean_inc(x_31); -lean_inc(x_30); -lean_dec(x_21); -x_32 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_32, 0, x_30); -lean_ctor_set(x_32, 1, x_31); -return x_32; -} -} -} -} -else -{ -lean_object* x_33; -x_33 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__8(x_3, x_4, x_5); -if (lean_obj_tag(x_33) == 0) -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; uint8_t x_40; lean_object* x_41; -x_34 = lean_ctor_get(x_33, 0); -lean_inc(x_34); -x_35 = lean_ctor_get(x_33, 1); -lean_inc(x_35); -lean_dec(x_33); -x_36 = lean_ctor_get(x_34, 0); +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_27, 0); +x_37 = lean_ctor_get(x_27, 1); +lean_inc(x_37); lean_inc(x_36); -x_37 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_37, 0, x_1); -lean_ctor_set(x_37, 1, x_2); -lean_ctor_set(x_37, 2, x_34); -x_38 = l_Lean_Server_Watchdog_handleRequest___closed__3; -x_39 = 1; -x_40 = 0; -x_41 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12(x_36, x_37, x_38, x_39, x_40, x_4, x_35); -lean_dec(x_36); -return x_41; +lean_dec(x_27); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +} } else { -uint8_t x_42; +lean_object* x_39; +x_39 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__8(x_3, x_4, x_5); +if (lean_obj_tag(x_39) == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; uint8_t x_46; lean_object* x_47; +x_40 = lean_ctor_get(x_39, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_39, 1); +lean_inc(x_41); +lean_dec(x_39); +x_42 = lean_ctor_get(x_40, 0); +lean_inc(x_42); +x_43 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_43, 0, x_1); +lean_ctor_set(x_43, 1, x_2); +lean_ctor_set(x_43, 2, x_40); +x_44 = l_Lean_Server_Watchdog_handleRequest___closed__3; +x_45 = 1; +x_46 = 0; +x_47 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12(x_42, x_43, x_44, x_45, x_46, x_4, x_41); +lean_dec(x_42); +return x_47; +} +else +{ +uint8_t x_48; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_42 = !lean_is_exclusive(x_33); -if (x_42 == 0) +x_48 = !lean_is_exclusive(x_39); +if (x_48 == 0) { -return x_33; +return x_39; } else { -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_33, 0); -x_44 = lean_ctor_get(x_33, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_33); -x_45 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_45, 0, x_43); -lean_ctor_set(x_45, 1, x_44); -return x_45; +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_39, 0); +x_50 = lean_ctor_get(x_39, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_39); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; } } } } else { -lean_object* x_46; -x_46 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__15(x_3, x_4, x_5); -if (lean_obj_tag(x_46) == 0) +lean_object* x_52; +x_52 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__15(x_3, x_4, x_5); +if (lean_obj_tag(x_52) == 0) { -lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51; uint8_t x_52; lean_object* x_53; -x_47 = lean_ctor_get(x_46, 0); -lean_inc(x_47); -x_48 = lean_ctor_get(x_46, 1); -lean_inc(x_48); -lean_dec(x_46); -lean_inc(x_47); -x_49 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_49, 0, x_1); -lean_ctor_set(x_49, 1, x_2); -lean_ctor_set(x_49, 2, x_47); -x_50 = l_Lean_Server_Watchdog_handleRequest___closed__4; -x_51 = 1; -x_52 = 0; -x_53 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17(x_47, x_49, x_50, x_51, x_52, x_4, x_48); -lean_dec(x_47); -return x_53; -} -else -{ -uint8_t x_54; -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_54 = !lean_is_exclusive(x_46); -if (x_54 == 0) -{ -return x_46; -} -else -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_46, 0); -x_56 = lean_ctor_get(x_46, 1); -lean_inc(x_56); +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58; uint8_t x_59; lean_object* x_60; +x_53 = lean_ctor_get(x_52, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_52, 1); +lean_inc(x_54); +lean_dec(x_52); +x_55 = lean_ctor_get(x_53, 0); lean_inc(x_55); -lean_dec(x_46); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); -return x_57; +x_56 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_56, 0, x_1); +lean_ctor_set(x_56, 1, x_2); +lean_ctor_set(x_56, 2, x_53); +x_57 = l_Lean_Server_Watchdog_handleRequest___closed__4; +x_58 = 1; +x_59 = 0; +x_60 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19(x_55, x_56, x_57, x_58, x_59, x_4, x_54); +lean_dec(x_55); +return x_60; +} +else +{ +uint8_t x_61; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_61 = !lean_is_exclusive(x_52); +if (x_61 == 0) +{ +return x_52; +} +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_52, 0); +x_63 = lean_ctor_get(x_52, 1); +lean_inc(x_63); +lean_inc(x_62); +lean_dec(x_52); +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_62); +lean_ctor_set(x_64, 1, x_63); +return x_64; +} +} +} +} +else +{ +lean_object* x_65; +x_65 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22(x_3, x_4, x_5); +if (lean_obj_tag(x_65) == 0) +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; uint8_t x_71; uint8_t x_72; lean_object* x_73; +x_66 = lean_ctor_get(x_65, 0); +lean_inc(x_66); +x_67 = lean_ctor_get(x_65, 1); +lean_inc(x_67); +lean_dec(x_65); +x_68 = lean_ctor_get(x_66, 0); +lean_inc(x_68); +x_69 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_69, 0, x_1); +lean_ctor_set(x_69, 1, x_2); +lean_ctor_set(x_69, 2, x_66); +x_70 = l_Lean_Server_Watchdog_handleRequest___closed__5; +x_71 = 1; +x_72 = 0; +x_73 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26(x_68, x_69, x_70, x_71, x_72, x_4, x_67); +lean_dec(x_68); +return x_73; +} +else +{ +uint8_t x_74; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_74 = !lean_is_exclusive(x_65); +if (x_74 == 0) +{ +return x_65; +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_75 = lean_ctor_get(x_65, 0); +x_76 = lean_ctor_get(x_65, 1); +lean_inc(x_76); +lean_inc(x_75); +lean_dec(x_65); +x_77 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_77, 0, x_75); +lean_ctor_set(x_77, 1, x_76); +return x_77; +} +} +} +} +else +{ +lean_object* x_78; +x_78 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29(x_3, x_4, x_5); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; uint8_t x_84; uint8_t x_85; lean_object* x_86; +x_79 = lean_ctor_get(x_78, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_78, 1); +lean_inc(x_80); +lean_dec(x_78); +x_81 = lean_ctor_get(x_79, 0); +lean_inc(x_81); +x_82 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_82, 0, x_1); +lean_ctor_set(x_82, 1, x_2); +lean_ctor_set(x_82, 2, x_79); +x_83 = l_Lean_Server_Watchdog_handleRequest___closed__6; +x_84 = 1; +x_85 = 0; +x_86 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33(x_81, x_82, x_83, x_84, x_85, x_4, x_80); +lean_dec(x_81); +return x_86; +} +else +{ +uint8_t x_87; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_87 = !lean_is_exclusive(x_78); +if (x_87 == 0) +{ +return x_78; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_88 = lean_ctor_get(x_78, 0); +x_89 = lean_ctor_get(x_78, 1); +lean_inc(x_89); +lean_inc(x_88); +lean_dec(x_78); +x_90 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_90, 0, x_88); +lean_ctor_set(x_90, 1, x_89); +return x_90; +} +} +} +} +else +{ +lean_object* x_91; +x_91 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36(x_3, x_4, x_5); +if (lean_obj_tag(x_91) == 0) +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; uint8_t x_96; uint8_t x_97; lean_object* x_98; +x_92 = lean_ctor_get(x_91, 0); +lean_inc(x_92); +x_93 = lean_ctor_get(x_91, 1); +lean_inc(x_93); +lean_dec(x_91); +lean_inc(x_92); +x_94 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_94, 0, x_1); +lean_ctor_set(x_94, 1, x_2); +lean_ctor_set(x_94, 2, x_92); +x_95 = l_Lean_Server_Watchdog_handleRequest___closed__7; +x_96 = 1; +x_97 = 0; +x_98 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38(x_92, x_94, x_95, x_96, x_97, x_4, x_93); +lean_dec(x_92); +return x_98; +} +else +{ +uint8_t x_99; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_99 = !lean_is_exclusive(x_91); +if (x_99 == 0) +{ +return x_91; +} +else +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_100 = lean_ctor_get(x_91, 0); +x_101 = lean_ctor_get(x_91, 1); +lean_inc(x_101); +lean_inc(x_100); +lean_dec(x_91); +x_102 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_102, 0, x_100); +lean_ctor_set(x_102, 1, x_101); +return x_102; } } } @@ -13198,7 +15412,7 @@ lean_dec(x_2); return x_4; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__18___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { size_t x_8; size_t x_9; lean_object* x_10; @@ -13206,13 +15420,13 @@ x_8 = lean_unbox_usize(x_3); lean_dec(x_3); x_9 = lean_unbox_usize(x_4); lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__18(x_1, x_2, x_8, x_9, x_5, x_6, x_7); +x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20(x_1, x_2, x_8, x_9, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_2); return x_10; } } -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__19___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { size_t x_4; size_t x_5; lean_object* x_6; @@ -13220,35 +15434,35 @@ x_4 = lean_unbox_usize(x_1); lean_dec(x_1); x_5 = lean_unbox_usize(x_2); lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__19(x_4, x_5, x_3); +x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(x_4, x_5, x_3); return x_6; } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___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_7; -x_7 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); return x_7; } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { uint8_t x_8; lean_object* x_9; x_8 = lean_unbox(x_1); lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); +x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); return x_9; } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { uint8_t x_8; uint8_t x_9; lean_object* x_10; @@ -13256,7 +15470,223 @@ x_8 = lean_unbox(x_4); lean_dec(x_4); x_9 = lean_unbox(x_5); lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17(x_1, x_2, x_3, x_8, x_9, x_6, x_7); +x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19(x_1, x_2, x_3, x_8, x_9, x_6, x_7); +lean_dec(x_1); +return x_10; +} +} +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27___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: +{ +size_t x_8; size_t x_9; lean_object* x_10; +x_8 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_9 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27(x_1, x_2, x_8, x_9, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_2); +return x_10; +} +} +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +size_t x_4; size_t x_5; lean_object* x_6; +x_4 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(x_4, x_5, x_3); +return x_6; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___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_7; +x_7 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_7; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; lean_object* x_9; +x_8 = lean_unbox(x_1); +lean_dec(x_1); +x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +return x_9; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; uint8_t x_9; lean_object* x_10; +x_8 = lean_unbox(x_4); +lean_dec(x_4); +x_9 = lean_unbox(x_5); +lean_dec(x_5); +x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26(x_1, x_2, x_3, x_8, x_9, x_6, x_7); +lean_dec(x_1); +return x_10; +} +} +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34___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: +{ +size_t x_8; size_t x_9; lean_object* x_10; +x_8 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_9 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34(x_1, x_2, x_8, x_9, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_2); +return x_10; +} +} +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +size_t x_4; size_t x_5; lean_object* x_6; +x_4 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(x_4, x_5, x_3); +return x_6; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___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_7; +x_7 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_7; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; lean_object* x_9; +x_8 = lean_unbox(x_1); +lean_dec(x_1); +x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +return x_9; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; uint8_t x_9; lean_object* x_10; +x_8 = lean_unbox(x_4); +lean_dec(x_4); +x_9 = lean_unbox(x_5); +lean_dec(x_5); +x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33(x_1, x_2, x_3, x_8, x_9, x_6, x_7); +lean_dec(x_1); +return x_10; +} +} +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__39___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: +{ +size_t x_8; size_t x_9; lean_object* x_10; +x_8 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_9 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__39(x_1, x_2, x_8, x_9, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_2); +return x_10; +} +} +lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__40___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +size_t x_4; size_t x_5; lean_object* x_6; +x_4 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__40(x_4, x_5, x_3); +return x_6; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___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_7; +x_7 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_7; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; lean_object* x_9; +x_8 = lean_unbox(x_1); +lean_dec(x_1); +x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +return x_9; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; uint8_t x_9; lean_object* x_10; +x_8 = lean_unbox(x_4); +lean_dec(x_4); +x_9 = lean_unbox(x_5); +lean_dec(x_5); +x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38(x_1, x_2, x_3, x_8, x_9, x_6, x_7); lean_dec(x_1); return x_10; } @@ -15238,10 +17668,13 @@ _start: lean_object* x_1; uint8_t x_2; lean_object* x_3; x_1 = l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__2; x_2 = 1; -x_3 = lean_alloc_ctor(0, 1, 2); +x_3 = lean_alloc_ctor(0, 1, 5); lean_ctor_set(x_3, 0, x_1); lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2); lean_ctor_set_uint8(x_3, sizeof(void*)*1 + 1, x_2); +lean_ctor_set_uint8(x_3, sizeof(void*)*1 + 2, x_2); +lean_ctor_set_uint8(x_3, sizeof(void*)*1 + 3, x_2); +lean_ctor_set_uint8(x_3, sizeof(void*)*1 + 4, x_2); return x_3; } } @@ -18369,6 +20802,12 @@ l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__1 = _init_l_Lean_ lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__1); l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__2 = _init_l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__2(); lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__2); +l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__3 = _init_l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__3(); +lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__3); +l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__4 = _init_l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__4(); +lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__4); +l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__5 = _init_l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__5(); +lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest_match__1___rarg___closed__5); l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__1); l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__2(); @@ -18377,10 +20816,22 @@ l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest__ lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__1); l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2(); lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__17___closed__2); +l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1(); +lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1); +l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2(); +lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2); +l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1(); +lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1); +l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2(); +lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2); +l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1(); +lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1); +l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2(); +lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2); +l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__1(); +lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__1); +l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__2(); +lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__38___closed__2); l_Lean_Server_Watchdog_handleRequest___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___closed__1); l_Lean_Server_Watchdog_handleRequest___closed__2 = _init_l_Lean_Server_Watchdog_handleRequest___closed__2(); @@ -18389,6 +20840,12 @@ l_Lean_Server_Watchdog_handleRequest___closed__3 = _init_l_Lean_Server_Watchdog_ lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___closed__3); l_Lean_Server_Watchdog_handleRequest___closed__4 = _init_l_Lean_Server_Watchdog_handleRequest___closed__4(); lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___closed__4); +l_Lean_Server_Watchdog_handleRequest___closed__5 = _init_l_Lean_Server_Watchdog_handleRequest___closed__5(); +lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___closed__5); +l_Lean_Server_Watchdog_handleRequest___closed__6 = _init_l_Lean_Server_Watchdog_handleRequest___closed__6(); +lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___closed__6); +l_Lean_Server_Watchdog_handleRequest___closed__7 = _init_l_Lean_Server_Watchdog_handleRequest___closed__7(); +lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___closed__7); l_Lean_Server_Watchdog_handleNotification_match__1___rarg___closed__1 = _init_l_Lean_Server_Watchdog_handleNotification_match__1___rarg___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_handleNotification_match__1___rarg___closed__1); l_Lean_Server_Watchdog_handleNotification___closed__1 = _init_l_Lean_Server_Watchdog_handleNotification___closed__1(); diff --git a/stage0/stdlib/Lean/Util/Path.c b/stage0/stdlib/Lean/Util/Path.c index 7b140e441e..8d9b387fc1 100644 --- a/stage0/stdlib/Lean/Util/Path.c +++ b/stage0/stdlib/Lean/Util/Path.c @@ -17,21 +17,23 @@ extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_moduleNameOfFileName___lambda__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getBuiltinSearchPath___closed__6; extern lean_object* l_String_instInhabitedString; -lean_object* l_IO_isDir___at_Lean_findOLean___spec__1___boxed(lean_object*, lean_object*); extern lean_object* l_Char_quote___closed__1; lean_object* lean_name_mk_string(lean_object*, lean_object*); +lean_object* l_List_findM_x3f___at_Lean_SearchPath_findWithExt___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_is_dir(lean_object*, lean_object*); lean_object* l_String_revPosOf(lean_object*, uint32_t); lean_object* l_Lean_modPathToFilePath_match__1(lean_object*); +lean_object* l_Lean_SearchPath_findWithExt___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_searchPathRef; -lean_object* l_IO_mkRef___at_Lean_initFn____x40_Lean_Util_Path___hyg_34____spec__1(lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* l_Lean_addSearchPathFromEnv_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getBuiltinSearchPath(lean_object*); -lean_object* l_Lean_parseSearchPath___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_parseSearchPath___boxed(lean_object*, lean_object*); +lean_object* l_IO_isDir___at_Lean_SearchPath_findWithExt___spec__1___boxed(lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_IO_mkRef___at_Lean_initFn____x40_Lean_Util_Path___hyg_198____spec__1(lean_object*, lean_object*); lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); lean_object* l_IO_getEnv___at_Lean_addSearchPathFromEnv___spec__1___boxed(lean_object*, lean_object*); lean_object* l_String_splitOn(lean_object*, lean_object*); @@ -42,25 +44,28 @@ lean_object* l_Lean_findOLean(lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); lean_object* l_Lean_getBuiltinSearchPath___closed__8; lean_object* l_Lean_findOLean_match__1(lean_object*); -lean_object* l_Lean_isStage0___boxed(lean_object*); lean_object* l_Lean_moduleNameOfFileName___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_current_dir(lean_object*); lean_object* l_Lean_getBuiltinSearchPath___closed__1; lean_object* l_Lean_moduleNameOfFileName___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_moduleNameOfFileName___lambda__1___closed__1; lean_object* l_Lean_addSearchPathFromEnv___closed__1; +lean_object* l_IO_fileExists___at_Lean_SearchPath_findWithExt___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_modPathToFilePath___closed__4; lean_object* l_Lean_moduleNameOfFileName___lambda__1___closed__2; lean_object* lean_io_realpath(lean_object*, lean_object*); lean_object* l_Lean_modPathToFilePath___closed__1; lean_object* l_System_FilePath_dirName(lean_object*); +lean_object* l___private_Lean_Util_Path_0__Lean_isStage0___boxed(lean_object*); lean_object* l_List_foldl___at_Lean_moduleNameOfFileName___spec__1(lean_object*, lean_object*); lean_object* l_System_FilePath_normalizePath(lean_object*); lean_object* l_Lean_getBuiltinSearchPath___closed__5; lean_object* lean_st_mk_ref(lean_object*, lean_object*); lean_object* l_Lean_modPathToFilePath___closed__2; -lean_object* l_Lean_initFn____x40_Lean_Util_Path___hyg_34_(lean_object*); +lean_object* l_Lean_initFn____x40_Lean_Util_Path___hyg_198_(lean_object*); +lean_object* l_Lean_findOLean___closed__2; lean_object* l_Lean_modPathToFilePath___boxed(lean_object*); +lean_object* l_Lean_SearchPath_findWithExt(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_moduleNameOfFileName_match__1___rarg(lean_object*, lean_object*, lean_object*); extern uint32_t l_System_FilePath_pathSeparator; uint32_t lean_string_utf8_get(lean_object*, lean_object*); @@ -70,34 +75,32 @@ lean_object* l_String_split___at_System_FilePath_splitSearchPath___spec__2(lean_ lean_object* l_Lean_modPathToFilePath___closed__3; lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_realPathNormalized(lean_object*, lean_object*); -lean_object* l_List_findM_x3f___at_Lean_findOLean___spec__3___closed__1; -lean_object* l_List_findM_x3f___at_Lean_findOLean___spec__3___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_List_findM_x3f___at_Lean_SearchPath_findWithExt___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_getEnv___at_Lean_addSearchPathFromEnv___spec__1(lean_object*, lean_object*); lean_object* l_Lean_initSearchPath_match__1(lean_object*); lean_object* lean_init_search_path(lean_object*, lean_object*); lean_object* l_Lean_addSearchPathFromEnv_match__1(lean_object*); -lean_object* l_IO_isDir___at_Lean_findOLean___spec__1(lean_object*, lean_object*); lean_object* l_Lean_findOLean___closed__1; lean_object* lean_io_file_exists(lean_object*, lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); lean_object* l_Lean_findOLean___boxed(lean_object*, lean_object*); +lean_object* l_IO_isDir___at_Lean_SearchPath_findWithExt___spec__1(lean_object*, lean_object*); uint8_t l_String_isPrefixOf(lean_object*, lean_object*); lean_object* l_IO_currentDir___at_Lean_moduleNameOfFileName___spec__2(lean_object*); lean_object* l_Lean_modPathToFilePath_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_isStage0(lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); -lean_object* l_IO_fileExists___at_Lean_findOLean___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_addSearchPathFromEnv(lean_object*, lean_object*); uint8_t l_Lean_getBuiltinSearchPath___closed__2; lean_object* l_Lean_moduleNameOfFileName_match__2___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_fileExists___at_Lean_SearchPath_findWithExt___spec__2(lean_object*, lean_object*); lean_object* l_Lean_getBuiltinSearchPath___closed__4; extern lean_object* l_System_mkFilePath___closed__1; lean_object* l_Lean_findOLean_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getBuiltinSearchPath___closed__7; lean_object* l_Lean_initSearchPath_match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_List_findM_x3f___at_Lean_findOLean___spec__3(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_parseSearchPath(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_parseSearchPath(lean_object*, lean_object*); +uint8_t l___private_Lean_Util_Path_0__Lean_isStage0(lean_object*); lean_object* l_IO_appPath___at_Lean_getBuiltinSearchPath___spec__2(lean_object*); lean_object* l_Lean_moduleNameOfFileName___lambda__2___closed__2; lean_object* l_Lean_moduleNameOfFileName_match__2(lean_object*); @@ -109,7 +112,6 @@ lean_object* l_String_drop(lean_object*, lean_object*); lean_object* l_Lean_Name_getRoot(lean_object*); lean_object* l_Lean_getBuiltinSearchPath___closed__3; lean_object* l___private_Lean_Util_Path_0__Lean_pathSep; -lean_object* l_IO_fileExists___at_Lean_findOLean___spec__2(lean_object*, lean_object*); lean_object* l_IO_realPath___at_Lean_realPathNormalized___spec__1(lean_object*, lean_object*); static lean_object* _init_l___private_Lean_Util_Path_0__Lean_pathSep() { _start: @@ -183,7 +185,500 @@ return x_14; } } } -lean_object* l_IO_mkRef___at_Lean_initFn____x40_Lean_Util_Path___hyg_34____spec__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_modPathToFilePath_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 0: +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_4); +lean_dec(x_2); +x_5 = lean_box(0); +x_6 = lean_apply_1(x_3, x_5); +return x_6; +} +case 1: +{ +lean_object* x_7; lean_object* x_8; size_t x_9; lean_object* x_10; lean_object* x_11; +lean_dec(x_4); +lean_dec(x_3); +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_8); +x_9 = lean_ctor_get_usize(x_1, 2); +lean_dec(x_1); +x_10 = lean_box_usize(x_9); +x_11 = lean_apply_3(x_2, x_7, x_8, x_10); +return x_11; +} +default: +{ +lean_object* x_12; lean_object* x_13; size_t x_14; lean_object* x_15; lean_object* x_16; +lean_dec(x_3); +lean_dec(x_2); +x_12 = lean_ctor_get(x_1, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_1, 1); +lean_inc(x_13); +x_14 = lean_ctor_get_usize(x_1, 2); +lean_dec(x_1); +x_15 = lean_box_usize(x_14); +x_16 = lean_apply_3(x_4, x_12, x_13, x_15); +return x_16; +} +} +} +} +lean_object* l_Lean_modPathToFilePath_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_modPathToFilePath_match__1___rarg), 4, 0); +return x_2; +} +} +static lean_object* _init_l_Lean_modPathToFilePath___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.Util.Path"); +return x_1; +} +} +static lean_object* _init_l_Lean_modPathToFilePath___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.modPathToFilePath"); +return x_1; +} +} +static lean_object* _init_l_Lean_modPathToFilePath___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("ill-formed import"); +return x_1; +} +} +static lean_object* _init_l_Lean_modPathToFilePath___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_Lean_modPathToFilePath___closed__1; +x_2 = l_Lean_modPathToFilePath___closed__2; +x_3 = lean_unsigned_to_nat(24u); +x_4 = lean_unsigned_to_nat(35u); +x_5 = l_Lean_modPathToFilePath___closed__3; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +lean_object* l_Lean_modPathToFilePath(lean_object* x_1) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 0: +{ +lean_object* x_2; +x_2 = l_Lean_instInhabitedParserDescr___closed__1; +return x_2; +} +case 1: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_3 = lean_ctor_get(x_1, 0); +x_4 = lean_ctor_get(x_1, 1); +x_5 = l_Lean_modPathToFilePath(x_3); +x_6 = l___private_Lean_Util_Path_0__Lean_pathSep; +x_7 = lean_string_append(x_5, x_6); +x_8 = lean_string_append(x_7, x_4); +return x_8; +} +default: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = l_String_instInhabitedString; +x_10 = l_Lean_modPathToFilePath___closed__4; +x_11 = lean_panic_fn(x_9, x_10); +return x_11; +} +} +} +} +lean_object* l_Lean_modPathToFilePath___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_modPathToFilePath(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_IO_isDir___at_Lean_SearchPath_findWithExt___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_io_is_dir(x_1, x_2); +return x_3; +} +} +lean_object* l_IO_fileExists___at_Lean_SearchPath_findWithExt___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_io_file_exists(x_1, x_2); +return x_3; +} +} +lean_object* l_List_findM_x3f___at_Lean_SearchPath_findWithExt___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_4); +return x_6; +} +else +{ +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; +x_7 = lean_ctor_get(x_3, 0); +x_8 = lean_ctor_get(x_3, 1); +x_9 = l_Lean_instInhabitedParserDescr___closed__1; +x_10 = lean_string_append(x_9, x_7); +x_11 = lean_string_append(x_10, x_9); +x_12 = l___private_Lean_Util_Path_0__Lean_pathSep; +x_13 = lean_string_append(x_11, x_12); +x_14 = lean_string_append(x_13, x_9); +x_15 = lean_string_append(x_14, x_2); +x_16 = lean_string_append(x_15, x_9); +x_17 = lean_io_is_dir(x_16, x_4); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; uint8_t x_19; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_unbox(x_18); +lean_dec(x_18); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_dec(x_17); +x_21 = lean_string_append(x_16, x_1); +x_22 = lean_string_append(x_21, x_9); +x_23 = lean_io_file_exists(x_22, x_20); +lean_dec(x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; uint8_t x_25; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_unbox(x_24); +lean_dec(x_24); +if (x_25 == 0) +{ +lean_object* x_26; +x_26 = lean_ctor_get(x_23, 1); +lean_inc(x_26); +lean_dec(x_23); +x_3 = x_8; +x_4 = x_26; +goto _start; +} +else +{ +uint8_t x_28; +x_28 = !lean_is_exclusive(x_23); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; +x_29 = lean_ctor_get(x_23, 0); +lean_dec(x_29); +lean_inc(x_7); +x_30 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_30, 0, x_7); +lean_ctor_set(x_23, 0, x_30); +return x_23; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_23, 1); +lean_inc(x_31); +lean_dec(x_23); +lean_inc(x_7); +x_32 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_32, 0, x_7); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_31); +return x_33; +} +} +} +else +{ +uint8_t x_34; +x_34 = !lean_is_exclusive(x_23); +if (x_34 == 0) +{ +return x_23; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_23, 0); +x_36 = lean_ctor_get(x_23, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_23); +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_38; +lean_dec(x_16); +x_38 = !lean_is_exclusive(x_17); +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; +x_39 = lean_ctor_get(x_17, 0); +lean_dec(x_39); +lean_inc(x_7); +x_40 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_40, 0, x_7); +lean_ctor_set(x_17, 0, x_40); +return x_17; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_17, 1); +lean_inc(x_41); +lean_dec(x_17); +lean_inc(x_7); +x_42 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_42, 0, x_7); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_41); +return x_43; +} +} +} +else +{ +uint8_t x_44; +lean_dec(x_16); +x_44 = !lean_is_exclusive(x_17); +if (x_44 == 0) +{ +return x_17; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_17, 0); +x_46 = lean_ctor_get(x_17, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_17); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +} +} +} +lean_object* l_Lean_SearchPath_findWithExt(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = l_Lean_Name_getRoot(x_3); +x_6 = l_Lean_Name_toString___closed__1; +x_7 = l_Lean_Name_toStringWithSep(x_6, x_5); +x_8 = l_List_findM_x3f___at_Lean_SearchPath_findWithExt___spec__3(x_2, x_7, x_1, x_4); +lean_dec(x_7); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +if (lean_obj_tag(x_9) == 0) +{ +uint8_t x_10; +x_10 = !lean_is_exclusive(x_8); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_8, 0); +lean_dec(x_11); +x_12 = lean_box(0); +lean_ctor_set(x_8, 0, x_12); +return x_8; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_8, 1); +lean_inc(x_13); +lean_dec(x_8); +x_14 = lean_box(0); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +return x_15; +} +} +else +{ +uint8_t x_16; +x_16 = !lean_is_exclusive(x_8); +if (x_16 == 0) +{ +lean_object* x_17; uint8_t x_18; +x_17 = lean_ctor_get(x_8, 0); +lean_dec(x_17); +x_18 = !lean_is_exclusive(x_9); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_19 = lean_ctor_get(x_9, 0); +x_20 = l_Lean_modPathToFilePath(x_3); +x_21 = lean_string_append(x_19, x_20); +lean_dec(x_20); +x_22 = lean_string_append(x_21, x_2); +lean_ctor_set(x_9, 0, x_22); +return x_8; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_23 = lean_ctor_get(x_9, 0); +lean_inc(x_23); +lean_dec(x_9); +x_24 = l_Lean_modPathToFilePath(x_3); +x_25 = lean_string_append(x_23, x_24); +lean_dec(x_24); +x_26 = lean_string_append(x_25, x_2); +x_27 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_8, 0, x_27); +return x_8; +} +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_28 = lean_ctor_get(x_8, 1); +lean_inc(x_28); +lean_dec(x_8); +x_29 = lean_ctor_get(x_9, 0); +lean_inc(x_29); +if (lean_is_exclusive(x_9)) { + lean_ctor_release(x_9, 0); + x_30 = x_9; +} else { + lean_dec_ref(x_9); + x_30 = lean_box(0); +} +x_31 = l_Lean_modPathToFilePath(x_3); +x_32 = lean_string_append(x_29, x_31); +lean_dec(x_31); +x_33 = lean_string_append(x_32, x_2); +if (lean_is_scalar(x_30)) { + x_34 = lean_alloc_ctor(1, 1, 0); +} else { + x_34 = x_30; +} +lean_ctor_set(x_34, 0, x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_28); +return x_35; +} +} +} +else +{ +uint8_t x_36; +x_36 = !lean_is_exclusive(x_8); +if (x_36 == 0) +{ +return x_8; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_8, 0); +x_38 = lean_ctor_get(x_8, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_8); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; +} +} +} +} +lean_object* l_IO_isDir___at_Lean_SearchPath_findWithExt___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_isDir___at_Lean_SearchPath_findWithExt___spec__1(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l_IO_fileExists___at_Lean_SearchPath_findWithExt___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_fileExists___at_Lean_SearchPath_findWithExt___spec__2(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l_List_findM_x3f___at_Lean_SearchPath_findWithExt___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_List_findM_x3f___at_Lean_SearchPath_findWithExt___spec__3(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_SearchPath_findWithExt___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_SearchPath_findWithExt(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_IO_mkRef___at_Lean_initFn____x40_Lean_Util_Path___hyg_198____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; @@ -208,37 +703,34 @@ return x_7; } } } -lean_object* l_Lean_initFn____x40_Lean_Util_Path___hyg_34_(lean_object* x_1) { +lean_object* l_Lean_initFn____x40_Lean_Util_Path___hyg_198_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = lean_box(0); -x_3 = l_IO_mkRef___at_Lean_initFn____x40_Lean_Util_Path___hyg_34____spec__1(x_2, x_1); +x_3 = l_IO_mkRef___at_Lean_initFn____x40_Lean_Util_Path___hyg_198____spec__1(x_2, x_1); return x_3; } } -lean_object* l_Lean_parseSearchPath(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_parseSearchPath(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = l_String_split___at_System_FilePath_splitSearchPath___spec__2(x_1); -x_5 = l_List_append___rarg(x_4, x_2); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_5); -lean_ctor_set(x_6, 1, x_3); -return x_6; -} -} -lean_object* l_Lean_parseSearchPath___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_parseSearchPath(x_1, x_2, x_3); -lean_dec(x_1); +lean_object* x_3; lean_object* x_4; +x_3 = l_String_split___at_System_FilePath_splitSearchPath___spec__2(x_1); +x_4 = l_List_append___rarg(x_3, x_2); return x_4; } } -lean_object* l_Lean_isStage0___boxed(lean_object* x_1) { +lean_object* l_Lean_parseSearchPath___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_parseSearchPath(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l___private_Lean_Util_Path_0__Lean_isStage0___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; @@ -583,39 +1075,60 @@ return x_9; } else { -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_4, 1); -lean_inc(x_10); -lean_dec(x_4); -x_11 = lean_ctor_get(x_5, 0); -lean_inc(x_11); -lean_dec(x_5); -x_12 = l_Lean_parseSearchPath(x_11, x_1, x_10); +uint8_t x_10; +x_10 = !lean_is_exclusive(x_4); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_4, 0); lean_dec(x_11); -return x_12; +x_12 = lean_ctor_get(x_5, 0); +lean_inc(x_12); +lean_dec(x_5); +x_13 = l_Lean_parseSearchPath(x_12, x_1); +lean_dec(x_12); +lean_ctor_set(x_4, 0, x_13); +return x_4; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_4, 1); +lean_inc(x_14); +lean_dec(x_4); +x_15 = lean_ctor_get(x_5, 0); +lean_inc(x_15); +lean_dec(x_5); +x_16 = l_Lean_parseSearchPath(x_15, x_1); +lean_dec(x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_14); +return x_17; +} } } else { -uint8_t x_13; +uint8_t x_18; lean_dec(x_1); -x_13 = !lean_is_exclusive(x_4); -if (x_13 == 0) +x_18 = !lean_is_exclusive(x_4); +if (x_18 == 0) { return x_4; } else { -lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_14 = lean_ctor_get(x_4, 0); -x_15 = lean_ctor_get(x_4, 1); -lean_inc(x_15); -lean_inc(x_14); +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_4, 0); +x_20 = lean_ctor_get(x_4, 1); +lean_inc(x_20); +lean_inc(x_19); lean_dec(x_4); -x_16 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_16, 0, x_14); -lean_ctor_set(x_16, 1, x_15); -return x_16; +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; } } } @@ -753,173 +1266,36 @@ return x_22; } else { -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; uint8_t x_30; +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; x_23 = lean_ctor_get(x_1, 0); lean_inc(x_23); lean_dec(x_1); x_24 = lean_box(0); -x_25 = l_Lean_parseSearchPath(x_23, x_24, x_2); +x_25 = l_Lean_parseSearchPath(x_23, x_24); lean_dec(x_23); -x_26 = lean_ctor_get(x_25, 0); -lean_inc(x_26); -x_27 = lean_ctor_get(x_25, 1); -lean_inc(x_27); -lean_dec(x_25); -x_28 = l_Lean_searchPathRef; -x_29 = lean_st_ref_set(x_28, x_26, x_27); -x_30 = !lean_is_exclusive(x_29); -if (x_30 == 0) +x_26 = l_Lean_searchPathRef; +x_27 = lean_st_ref_set(x_26, x_25, x_2); +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) { -return x_29; +return x_27; } else { -lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_29, 0); -x_32 = lean_ctor_get(x_29, 1); -lean_inc(x_32); -lean_inc(x_31); -lean_dec(x_29); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -return x_33; +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_27, 0); +x_30 = lean_ctor_get(x_27, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_27); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; } } } } -lean_object* l_Lean_modPathToFilePath_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -switch (lean_obj_tag(x_1)) { -case 0: -{ -lean_object* x_5; lean_object* x_6; -lean_dec(x_4); -lean_dec(x_2); -x_5 = lean_box(0); -x_6 = lean_apply_1(x_3, x_5); -return x_6; -} -case 1: -{ -lean_object* x_7; lean_object* x_8; size_t x_9; lean_object* x_10; lean_object* x_11; -lean_dec(x_4); -lean_dec(x_3); -x_7 = lean_ctor_get(x_1, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_1, 1); -lean_inc(x_8); -x_9 = lean_ctor_get_usize(x_1, 2); -lean_dec(x_1); -x_10 = lean_box_usize(x_9); -x_11 = lean_apply_3(x_2, x_7, x_8, x_10); -return x_11; -} -default: -{ -lean_object* x_12; lean_object* x_13; size_t x_14; lean_object* x_15; lean_object* x_16; -lean_dec(x_3); -lean_dec(x_2); -x_12 = lean_ctor_get(x_1, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_1, 1); -lean_inc(x_13); -x_14 = lean_ctor_get_usize(x_1, 2); -lean_dec(x_1); -x_15 = lean_box_usize(x_14); -x_16 = lean_apply_3(x_4, x_12, x_13, x_15); -return x_16; -} -} -} -} -lean_object* l_Lean_modPathToFilePath_match__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_modPathToFilePath_match__1___rarg), 4, 0); -return x_2; -} -} -static lean_object* _init_l_Lean_modPathToFilePath___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("Lean.Util.Path"); -return x_1; -} -} -static lean_object* _init_l_Lean_modPathToFilePath___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("Lean.modPathToFilePath"); -return x_1; -} -} -static lean_object* _init_l_Lean_modPathToFilePath___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("ill-formed import"); -return x_1; -} -} -static lean_object* _init_l_Lean_modPathToFilePath___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_1 = l_Lean_modPathToFilePath___closed__1; -x_2 = l_Lean_modPathToFilePath___closed__2; -x_3 = lean_unsigned_to_nat(54u); -x_4 = lean_unsigned_to_nat(35u); -x_5 = l_Lean_modPathToFilePath___closed__3; -x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); -return x_6; -} -} -lean_object* l_Lean_modPathToFilePath(lean_object* x_1) { -_start: -{ -switch (lean_obj_tag(x_1)) { -case 0: -{ -lean_object* x_2; -x_2 = l_Lean_instInhabitedParserDescr___closed__1; -return x_2; -} -case 1: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_3 = lean_ctor_get(x_1, 0); -x_4 = lean_ctor_get(x_1, 1); -x_5 = l_Lean_modPathToFilePath(x_3); -x_6 = l___private_Lean_Util_Path_0__Lean_pathSep; -x_7 = lean_string_append(x_5, x_6); -x_8 = lean_string_append(x_7, x_4); -return x_8; -} -default: -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_9 = l_String_instInhabitedString; -x_10 = l_Lean_modPathToFilePath___closed__4; -x_11 = lean_panic_fn(x_9, x_10); -return x_11; -} -} -} -} -lean_object* l_Lean_modPathToFilePath___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_modPathToFilePath(x_1); -lean_dec(x_1); -return x_2; -} -} lean_object* l_Lean_findOLean_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -950,23 +1326,7 @@ x_2 = lean_alloc_closure((void*)(l_Lean_findOLean_match__1___rarg), 3, 0); return x_2; } } -lean_object* l_IO_isDir___at_Lean_findOLean___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_io_is_dir(x_1, x_2); -return x_3; -} -} -lean_object* l_IO_fileExists___at_Lean_findOLean___spec__2(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_io_file_exists(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_List_findM_x3f___at_Lean_findOLean___spec__3___closed__1() { +static lean_object* _init_l_Lean_findOLean___closed__1() { _start: { lean_object* x_1; @@ -974,181 +1334,7 @@ x_1 = lean_mk_string(".olean"); return x_1; } } -lean_object* l_List_findM_x3f___at_Lean_findOLean___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_box(0); -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; -} -else -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_6 = lean_ctor_get(x_2, 0); -x_7 = lean_ctor_get(x_2, 1); -x_8 = l_Lean_instInhabitedParserDescr___closed__1; -x_9 = lean_string_append(x_8, x_6); -x_10 = lean_string_append(x_9, x_8); -x_11 = l___private_Lean_Util_Path_0__Lean_pathSep; -x_12 = lean_string_append(x_10, x_11); -x_13 = lean_string_append(x_12, x_8); -x_14 = lean_string_append(x_13, x_1); -lean_inc(x_14); -x_15 = lean_string_append(x_14, x_8); -x_16 = lean_io_is_dir(x_15, x_3); -lean_dec(x_15); -if (lean_obj_tag(x_16) == 0) -{ -lean_object* x_17; uint8_t x_18; -x_17 = lean_ctor_get(x_16, 0); -lean_inc(x_17); -x_18 = lean_unbox(x_17); -lean_dec(x_17); -if (x_18 == 0) -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_19 = lean_ctor_get(x_16, 1); -lean_inc(x_19); -lean_dec(x_16); -x_20 = l_List_findM_x3f___at_Lean_findOLean___spec__3___closed__1; -x_21 = lean_string_append(x_14, x_20); -x_22 = lean_io_file_exists(x_21, x_19); -lean_dec(x_21); -if (lean_obj_tag(x_22) == 0) -{ -lean_object* x_23; uint8_t x_24; -x_23 = lean_ctor_get(x_22, 0); -lean_inc(x_23); -x_24 = lean_unbox(x_23); -lean_dec(x_23); -if (x_24 == 0) -{ -lean_object* x_25; -x_25 = lean_ctor_get(x_22, 1); -lean_inc(x_25); -lean_dec(x_22); -x_2 = x_7; -x_3 = x_25; -goto _start; -} -else -{ -uint8_t x_27; -x_27 = !lean_is_exclusive(x_22); -if (x_27 == 0) -{ -lean_object* x_28; lean_object* x_29; -x_28 = lean_ctor_get(x_22, 0); -lean_dec(x_28); -lean_inc(x_6); -x_29 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_29, 0, x_6); -lean_ctor_set(x_22, 0, x_29); -return x_22; -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_30 = lean_ctor_get(x_22, 1); -lean_inc(x_30); -lean_dec(x_22); -lean_inc(x_6); -x_31 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_31, 0, x_6); -x_32 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_30); -return x_32; -} -} -} -else -{ -uint8_t x_33; -x_33 = !lean_is_exclusive(x_22); -if (x_33 == 0) -{ -return x_22; -} -else -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_34 = lean_ctor_get(x_22, 0); -x_35 = lean_ctor_get(x_22, 1); -lean_inc(x_35); -lean_inc(x_34); -lean_dec(x_22); -x_36 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_36, 0, x_34); -lean_ctor_set(x_36, 1, x_35); -return x_36; -} -} -} -else -{ -uint8_t x_37; -lean_dec(x_14); -x_37 = !lean_is_exclusive(x_16); -if (x_37 == 0) -{ -lean_object* x_38; lean_object* x_39; -x_38 = lean_ctor_get(x_16, 0); -lean_dec(x_38); -lean_inc(x_6); -x_39 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_39, 0, x_6); -lean_ctor_set(x_16, 0, x_39); -return x_16; -} -else -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_16, 1); -lean_inc(x_40); -lean_dec(x_16); -lean_inc(x_6); -x_41 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_41, 0, x_6); -x_42 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_42, 0, x_41); -lean_ctor_set(x_42, 1, x_40); -return x_42; -} -} -} -else -{ -uint8_t x_43; -lean_dec(x_14); -x_43 = !lean_is_exclusive(x_16); -if (x_43 == 0) -{ -return x_16; -} -else -{ -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_16, 0); -x_45 = lean_ctor_get(x_16, 1); -lean_inc(x_45); -lean_inc(x_44); -lean_dec(x_16); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_44); -lean_ctor_set(x_46, 1, x_45); -return x_46; -} -} -} -} -} -static lean_object* _init_l_Lean_findOLean___closed__1() { +static lean_object* _init_l_Lean_findOLean___closed__2() { _start: { lean_object* x_1; @@ -1159,7 +1345,7 @@ return x_1; lean_object* l_Lean_findOLean(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_3 = l_Lean_searchPathRef; x_4 = lean_st_ref_get(x_3, x_2); x_5 = lean_ctor_get(x_4, 0); @@ -1167,149 +1353,113 @@ lean_inc(x_5); x_6 = lean_ctor_get(x_4, 1); lean_inc(x_6); lean_dec(x_4); -x_7 = l_Lean_Name_getRoot(x_1); -x_8 = l_Lean_Name_toString___closed__1; -x_9 = l_Lean_Name_toStringWithSep(x_8, x_7); -x_10 = l_List_findM_x3f___at_Lean_findOLean___spec__3(x_9, x_5, x_6); +x_7 = l_Lean_findOLean___closed__1; +x_8 = l_Lean_SearchPath_findWithExt(x_5, x_7, x_1, x_6); lean_dec(x_5); -if (lean_obj_tag(x_10) == 0) +if (lean_obj_tag(x_8) == 0) { -lean_object* x_11; -x_11 = lean_ctor_get(x_10, 0); -lean_inc(x_11); -if (lean_obj_tag(x_11) == 0) +lean_object* x_9; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +if (lean_obj_tag(x_9) == 0) { -uint8_t x_12; -x_12 = !lean_is_exclusive(x_10); -if (x_12 == 0) +uint8_t x_10; +x_10 = !lean_is_exclusive(x_8); +if (x_10 == 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_10, 0); -lean_dec(x_13); -x_14 = l_Lean_findOLean___closed__1; -x_15 = lean_string_append(x_14, x_9); -lean_dec(x_9); -x_16 = l_Char_quote___closed__1; -x_17 = lean_string_append(x_15, x_16); -x_18 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set_tag(x_10, 1); -lean_ctor_set(x_10, 0, x_18); -return x_10; -} -else -{ -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_19 = lean_ctor_get(x_10, 1); -lean_inc(x_19); -lean_dec(x_10); -x_20 = l_Lean_findOLean___closed__1; -x_21 = lean_string_append(x_20, x_9); -lean_dec(x_9); -x_22 = l_Char_quote___closed__1; -x_23 = lean_string_append(x_21, x_22); -x_24 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_24, 0, x_23); -x_25 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_25, 0, x_24); -lean_ctor_set(x_25, 1, x_19); -return x_25; -} -} -else -{ -uint8_t x_26; -lean_dec(x_9); -x_26 = !lean_is_exclusive(x_10); -if (x_26 == 0) -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_27 = lean_ctor_get(x_10, 0); -lean_dec(x_27); -x_28 = lean_ctor_get(x_11, 0); -lean_inc(x_28); +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_11 = lean_ctor_get(x_8, 0); lean_dec(x_11); -x_29 = l_Lean_modPathToFilePath(x_1); -x_30 = lean_string_append(x_28, x_29); -lean_dec(x_29); -x_31 = l_List_findM_x3f___at_Lean_findOLean___spec__3___closed__1; -x_32 = lean_string_append(x_30, x_31); -lean_ctor_set(x_10, 0, x_32); -return x_10; +x_12 = l_Lean_Name_getRoot(x_1); +x_13 = l_Lean_Name_toString___closed__1; +x_14 = l_Lean_Name_toStringWithSep(x_13, x_12); +x_15 = l_Lean_findOLean___closed__2; +x_16 = lean_string_append(x_15, x_14); +lean_dec(x_14); +x_17 = l_Char_quote___closed__1; +x_18 = lean_string_append(x_16, x_17); +x_19 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set_tag(x_8, 1); +lean_ctor_set(x_8, 0, x_19); +return x_8; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_33 = lean_ctor_get(x_10, 1); +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; +x_20 = lean_ctor_get(x_8, 1); +lean_inc(x_20); +lean_dec(x_8); +x_21 = l_Lean_Name_getRoot(x_1); +x_22 = l_Lean_Name_toString___closed__1; +x_23 = l_Lean_Name_toStringWithSep(x_22, x_21); +x_24 = l_Lean_findOLean___closed__2; +x_25 = lean_string_append(x_24, x_23); +lean_dec(x_23); +x_26 = l_Char_quote___closed__1; +x_27 = lean_string_append(x_25, x_26); +x_28 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_28, 0, x_27); +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_20); +return x_29; +} +} +else +{ +uint8_t x_30; +x_30 = !lean_is_exclusive(x_8); +if (x_30 == 0) +{ +lean_object* x_31; lean_object* x_32; +x_31 = lean_ctor_get(x_8, 0); +lean_dec(x_31); +x_32 = lean_ctor_get(x_9, 0); +lean_inc(x_32); +lean_dec(x_9); +lean_ctor_set(x_8, 0, x_32); +return x_8; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_8, 1); lean_inc(x_33); -lean_dec(x_10); -x_34 = lean_ctor_get(x_11, 0); +lean_dec(x_8); +x_34 = lean_ctor_get(x_9, 0); lean_inc(x_34); -lean_dec(x_11); -x_35 = l_Lean_modPathToFilePath(x_1); -x_36 = lean_string_append(x_34, x_35); -lean_dec(x_35); -x_37 = l_List_findM_x3f___at_Lean_findOLean___spec__3___closed__1; -x_38 = lean_string_append(x_36, x_37); -x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_33); +lean_dec(x_9); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +return x_35; +} +} +} +else +{ +uint8_t x_36; +x_36 = !lean_is_exclusive(x_8); +if (x_36 == 0) +{ +return x_8; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_8, 0); +x_38 = lean_ctor_get(x_8, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_8); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); return x_39; } } } -else -{ -uint8_t x_40; -lean_dec(x_9); -x_40 = !lean_is_exclusive(x_10); -if (x_40 == 0) -{ -return x_10; -} -else -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_41 = lean_ctor_get(x_10, 0); -x_42 = lean_ctor_get(x_10, 1); -lean_inc(x_42); -lean_inc(x_41); -lean_dec(x_10); -x_43 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_43, 0, x_41); -lean_ctor_set(x_43, 1, x_42); -return x_43; -} -} -} -} -lean_object* l_IO_isDir___at_Lean_findOLean___spec__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_isDir___at_Lean_findOLean___spec__1(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_IO_fileExists___at_Lean_findOLean___spec__2___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_fileExists___at_Lean_findOLean___spec__2(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_List_findM_x3f___at_Lean_findOLean___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_List_findM_x3f___at_Lean_findOLean___spec__3(x_1, x_2, x_3); -lean_dec(x_2); -lean_dec(x_1); -return x_4; -} } lean_object* l_Lean_findOLean___boxed(lean_object* x_1, lean_object* x_2) { _start: @@ -1761,7 +1911,15 @@ if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l___private_Lean_Util_Path_0__Lean_pathSep = _init_l___private_Lean_Util_Path_0__Lean_pathSep(); lean_mark_persistent(l___private_Lean_Util_Path_0__Lean_pathSep); -res = l_Lean_initFn____x40_Lean_Util_Path___hyg_34_(lean_io_mk_world()); +l_Lean_modPathToFilePath___closed__1 = _init_l_Lean_modPathToFilePath___closed__1(); +lean_mark_persistent(l_Lean_modPathToFilePath___closed__1); +l_Lean_modPathToFilePath___closed__2 = _init_l_Lean_modPathToFilePath___closed__2(); +lean_mark_persistent(l_Lean_modPathToFilePath___closed__2); +l_Lean_modPathToFilePath___closed__3 = _init_l_Lean_modPathToFilePath___closed__3(); +lean_mark_persistent(l_Lean_modPathToFilePath___closed__3); +l_Lean_modPathToFilePath___closed__4 = _init_l_Lean_modPathToFilePath___closed__4(); +lean_mark_persistent(l_Lean_modPathToFilePath___closed__4); +res = l_Lean_initFn____x40_Lean_Util_Path___hyg_198_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_searchPathRef = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_searchPathRef); @@ -1783,18 +1941,10 @@ l_Lean_getBuiltinSearchPath___closed__8 = _init_l_Lean_getBuiltinSearchPath___cl lean_mark_persistent(l_Lean_getBuiltinSearchPath___closed__8); l_Lean_addSearchPathFromEnv___closed__1 = _init_l_Lean_addSearchPathFromEnv___closed__1(); lean_mark_persistent(l_Lean_addSearchPathFromEnv___closed__1); -l_Lean_modPathToFilePath___closed__1 = _init_l_Lean_modPathToFilePath___closed__1(); -lean_mark_persistent(l_Lean_modPathToFilePath___closed__1); -l_Lean_modPathToFilePath___closed__2 = _init_l_Lean_modPathToFilePath___closed__2(); -lean_mark_persistent(l_Lean_modPathToFilePath___closed__2); -l_Lean_modPathToFilePath___closed__3 = _init_l_Lean_modPathToFilePath___closed__3(); -lean_mark_persistent(l_Lean_modPathToFilePath___closed__3); -l_Lean_modPathToFilePath___closed__4 = _init_l_Lean_modPathToFilePath___closed__4(); -lean_mark_persistent(l_Lean_modPathToFilePath___closed__4); -l_List_findM_x3f___at_Lean_findOLean___spec__3___closed__1 = _init_l_List_findM_x3f___at_Lean_findOLean___spec__3___closed__1(); -lean_mark_persistent(l_List_findM_x3f___at_Lean_findOLean___spec__3___closed__1); l_Lean_findOLean___closed__1 = _init_l_Lean_findOLean___closed__1(); lean_mark_persistent(l_Lean_findOLean___closed__1); +l_Lean_findOLean___closed__2 = _init_l_Lean_findOLean___closed__2(); +lean_mark_persistent(l_Lean_findOLean___closed__2); l_Lean_moduleNameOfFileName___lambda__1___closed__1 = _init_l_Lean_moduleNameOfFileName___lambda__1___closed__1(); lean_mark_persistent(l_Lean_moduleNameOfFileName___lambda__1___closed__1); l_Lean_moduleNameOfFileName___lambda__1___closed__2 = _init_l_Lean_moduleNameOfFileName___lambda__1___closed__2();