chore: Update Lean to v4.17.0
This commit is contained in:
parent
bc37482212
commit
d305918bb9
|
@ -122,7 +122,8 @@ partial def instantiateDelayedMVars (expr : Expr) : MetaM Expr :=
|
|||
return .visit (mkAppN assign args)
|
||||
else if let some { fvars, mvarIdPending } ← getDelayedMVarAssignment? mvarId then
|
||||
if ← isTracingEnabledFor `Pantograph.Delate then
|
||||
let substTableStr := String.intercalate ", " $ Array.zipWith fvars args (λ fvar assign => s!"{fvar.fvarId!.name} := {assign}") |>.toList
|
||||
let substTableStr := ",".intercalate $
|
||||
Array.zipWith (λ fvar assign => s!"{fvar.fvarId!.name} := {assign}") fvars args |>.toList
|
||||
trace[Pantograph.Delate]"MD ?{mvarId.name} := ?{mvarIdPending.name} [{substTableStr}]"
|
||||
|
||||
if args.size < fvars.size then
|
||||
|
|
|
@ -91,7 +91,6 @@ def inspect (args: Protocol.EnvInspect) (options: @&Protocol.Options): CoreM (Pr
|
|||
isUnsafe := info.isUnsafe,
|
||||
value? := ← value?.mapM (λ v => serializeExpression options v |>.run'),
|
||||
publicName? := Lean.privateToUserName? name |>.map (·.toString),
|
||||
-- BUG: Warning: getUsedConstants here will not include projections. This is a known bug.
|
||||
typeDependency? := if args.dependency?.getD false
|
||||
then .some <| type.getUsedConstants.map (λ n => serializeName n)
|
||||
else .none,
|
||||
|
@ -169,7 +168,7 @@ def addDecl (args: Protocol.EnvAdd): CoreM (Protocol.CR Protocol.EnvAddResult) :
|
|||
let (type, value) ← match ← tvM.run' (ctx := {}) |>.run' with
|
||||
| .ok t => pure t
|
||||
| .error e => return .error $ Protocol.errorExpr e
|
||||
let constant := Lean.Declaration.defnDecl <| Lean.mkDefinitionValEx
|
||||
let decl := Lean.Declaration.defnDecl <| Lean.mkDefinitionValEx
|
||||
(name := args.name.toName)
|
||||
(levelParams := [])
|
||||
(type := type)
|
||||
|
@ -177,13 +176,7 @@ def addDecl (args: Protocol.EnvAdd): CoreM (Protocol.CR Protocol.EnvAddResult) :
|
|||
(hints := Lean.mkReducibilityHintsRegularEx 1)
|
||||
(safety := Lean.DefinitionSafety.safe)
|
||||
(all := [])
|
||||
let env' ← match env.addDecl (← getOptions) constant with
|
||||
| .error e => do
|
||||
let options ← Lean.MonadOptions.getOptions
|
||||
let desc ← (e.toMessageData options).toString
|
||||
return .error $ { error := "kernel", desc }
|
||||
| .ok env' => pure env'
|
||||
Lean.MonadEnv.modifyEnv (λ _ => env')
|
||||
Lean.addDecl decl
|
||||
return .ok {}
|
||||
|
||||
end Pantograph.Environment
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Pantograph
|
||||
|
||||
@[export pantograph_version]
|
||||
def version := "0.3.0-rc.1"
|
||||
def version := "0.3.0"
|
||||
|
||||
end Pantograph
|
||||
|
|
|
@ -47,12 +47,8 @@ def test_environment_pickling : TestM Unit := do
|
|||
(hints := Lean.mkReducibilityHintsRegularEx 1)
|
||||
(safety := Lean.DefinitionSafety.safe)
|
||||
(all := [])
|
||||
let env' ← match (← getEnv).addDecl (← getOptions) c with
|
||||
| .error e => do
|
||||
let error ← (e.toMessageData (← getOptions)).toString
|
||||
throwError error
|
||||
| .ok env' => pure env'
|
||||
environmentPickle env' envPicklePath
|
||||
addDecl c
|
||||
environmentPickle (← getEnv) envPicklePath
|
||||
|
||||
let _ ← runCoreM coreDst do
|
||||
let (env', _) ← environmentUnpickle envPicklePath
|
||||
|
|
|
@ -1 +1 @@
|
|||
leanprover/lean4:v4.16.0
|
||||
leanprover/lean4:v4.17.0
|
||||
|
|
Loading…
Reference in New Issue