chore: remove dead code

This commit is contained in:
Leonardo de Moura 2022-08-19 11:56:22 -07:00
parent a7c96142ea
commit a29a61b728
3 changed files with 1 additions and 35 deletions

View file

@ -38,23 +38,6 @@ instance : MonadInferType CompilerM where
instance : MonadLCtx CompilerM where
getLCtx := return (← get).lctx
structure CompilerM.SavedState where
core : Core.State
compiler : CompilerM.State
deriving Inhabited
protected def CompilerM.saveState : CompilerM CompilerM.SavedState :=
return { core := (← getThe Core.State), compiler := (← get) }
/-- Restore backtrackable parts of the state. -/
def CompilerM.SavedState.restore (b : SavedState) : CompilerM Unit := do
Core.restore b.core
set b.compiler
instance : MonadBacktrack CompilerM.SavedState CompilerM where
saveState := CompilerM.saveState
restoreState s := s.restore
/--
Add a new local declaration with the given arguments to the `LocalContext` of `CompilerM`.
Returns the free variable representing the new declaration.

View file

@ -121,23 +121,6 @@ structure State where
abbrev SimpM := ReaderT Context $ StateRefT State CompilerM
structure SavedState where
compiler : CompilerM.SavedState
simp : State
deriving Inhabited
protected def saveState : SimpM SavedState :=
return { compiler := (← CompilerM.saveState), simp := (← get) }
/-- Restore backtrackable parts of the state. -/
def SavedState.restore (b : SavedState) : SimpM Unit := do
b.compiler.restore
set b.simp
instance : MonadBacktrack SavedState SimpM where
saveState := Simp.saveState
restoreState s := s.restore
def markSimplified : SimpM Unit :=
modify fun s => { s with simplified := true }

View file

@ -44,7 +44,7 @@ def Vec.head : Vec α (n+1) → α
#eval Compiler.compile #[``Lean.Elab.Term.synthesizeSyntheticMVars]
set_option profiler true
set_option trace.Compiler true
set_option trace.Compiler.simp true
#eval Compiler.compile #[``Lean.Meta.isExprDefEqAuxImpl]
def foo (a b : Nat) :=