chore: Update Lean to v4.20.1

This commit is contained in:
Leni Aniva 2025-06-17 08:38:03 -07:00
parent 3d65f6a69e
commit 3ce335ebfe
Signed by: aniva
GPG Key ID: D5F96287843E8DFB
4 changed files with 18 additions and 14 deletions

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 declRange? ← findDeclarationRanges? name
let sourceStart? := declRange?.map (·.range.pos)
let sourceEnd? := declRange?.map (·.range.endPos)
.pure {
result with
sourceUri?,
sourceStart?,
sourceEnd?,
}
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?.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