chore: Update Lean to v4.20.1 #209

Merged
aniva merged 6 commits from chore/toolchain into dev 2025-06-18 16:39:19 -07:00
4 changed files with 18 additions and 14 deletions
Showing only changes of commit 3ce335ebfe - Show all commits

View File

@ -4,6 +4,7 @@ import Pantograph.Protocol
import Pantograph.Serial
import Lean.Environment
import Lean.Replay
import Lean.Util.Path
open Lean
open Pantograph
@ -130,17 +131,20 @@ def inspect (args: Protocol.EnvInspect) (options: @&Protocol.Options): Protocol.
} }
| _ => pure core
let result ← if args.source?.getD false then
let srcSearchPath ← initSrcSearchPath
let sourceUri? ← module?.bindM (Server.documentUriFromModule srcSearchPath ·)
let srcSearchPath ← getSrcSearchPath
try
let sourceUri? ← module?.mapM (findLean srcSearchPath ·)
let declRange? ← findDeclarationRanges? name
let sourceStart? := declRange?.map (·.range.pos)
let sourceEnd? := declRange?.map (·.range.endPos)
.pure {
result with
sourceUri?,
sourceUri? := sourceUri?.map (toString ·),
sourceStart?,
sourceEnd?,
}
catch _ =>
.pure result
else
.pure result
return result

View File

@ -69,7 +69,7 @@ def createCoreContext (options: Array String): IO Core.Context := do
@[export pantograph_create_core_state]
def createCoreState (imports: Array String): IO Core.State := do
let env ← Lean.importModules
(imports := imports.map (λ str => { module := str.toName, runtimeOnly := false }))
(imports := imports.map (λ str => { module := str.toName }))
(opts := {})
(trustLevel := 1)
(loadExts := true)

View File

@ -1,6 +1,6 @@
namespace Pantograph
@[export pantograph_version]
def version := "0.3.1"
def version := "0.3.2"
end Pantograph

View File

@ -1 +1 @@
leanprover/lean4:v4.19.0
leanprover/lean4:v4.20.1