chore: Update Lean to v4.20.1
This commit is contained in:
parent
3d65f6a69e
commit
3ce335ebfe
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Pantograph
|
||||
|
||||
@[export pantograph_version]
|
||||
def version := "0.3.1"
|
||||
def version := "0.3.2"
|
||||
|
||||
end Pantograph
|
||||
|
|
|
@ -1 +1 @@
|
|||
leanprover/lean4:v4.19.0
|
||||
leanprover/lean4:v4.20.1
|
||||
|
|
Loading…
Reference in New Issue