feat(serial): Pickle environment delta's #221

Merged
aniva merged 5 commits from serial/delta into dev 2025-06-27 16:02:22 -07:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 349cff6f05 - Show all commits

View File

@ -136,8 +136,9 @@ protected def GoalState.withRootContext { n } [MonadControlT MetaM n] [Monad n]
Meta.mapMetaM <| state.withContext' state.root
private def restoreCoreMExtra (state : Core.SavedState) : CoreM Unit :=
let { nextMacroScope, ngen, .. } := state
modifyGetThe Core.State (fun st => ((),
{ st with nextMacroScope := state.nextMacroScope, ngen := state.ngen }))
{ st with nextMacroScope, ngen }))
-- Restore the name generator and macro scopes of the core state
protected def GoalState.restoreCoreMExtra (state: GoalState): CoreM Unit :=
restoreCoreMExtra state.coreState

View File

@ -291,6 +291,7 @@ def test_replay_environment : TestM Unit := do
pure type
let .success state1 _ ← state.tryTacticM goal (Tactic.assignWithAuxLemma type) | fail "left"
state.restoreMetaM
let goal := state.goals[1]!
let type ← goal.withContext do
let .ok type ← elabTerm (← `(term|(3: Nat) ≤ 5)) (.some $ .sort 0) | unreachable!