chore: remove staging workaround
This commit is contained in:
parent
b376b1594e
commit
7350d0a3ff
2 changed files with 3 additions and 3 deletions
|
|
@ -46,7 +46,7 @@ namespace Command
|
|||
liftTermElabM do
|
||||
checkSimprocType declName
|
||||
let keys ← elabSimprocKeys pattern
|
||||
let val := mkAppN (mkConst ``registerBuiltinSimprocNew) #[toExpr declName, toExpr keys, mkConst declName]
|
||||
let val := mkAppN (mkConst ``registerBuiltinSimproc) #[toExpr declName, toExpr keys, mkConst declName]
|
||||
let initDeclName ← mkFreshUserName (declName ++ `declare)
|
||||
declareBuiltin initDeclName val
|
||||
|
||||
|
|
|
|||
|
|
@ -59,13 +59,13 @@ def isBuiltinSimproc (declName : Name) : CoreM Bool := do
|
|||
def isSimproc (declName : Name) : CoreM Bool :=
|
||||
return (← getSimprocDeclKeys? declName).isSome
|
||||
|
||||
def registerBuiltinSimproc (declName : Name) (key : Array SimpTheoremKey) : IO Unit := do
|
||||
def registerBuiltinSimproc (declName : Name) (key : Array SimpTheoremKey) (proc : Simproc) : IO Unit := do
|
||||
unless (← initializing) do
|
||||
throw (IO.userError s!"invalid builtin simproc declaration, it can only be registered during initialization")
|
||||
if (← builtinSimprocDeclsRef.get).keys.contains declName then
|
||||
throw (IO.userError s!"invalid builtin simproc declaration '{declName}', it has already been declared")
|
||||
builtinSimprocDeclsRef.modify fun { keys, procs } =>
|
||||
{ keys := keys.insert declName key, procs }
|
||||
{ keys := keys.insert declName key, procs := procs.insert declName proc }
|
||||
|
||||
def registerBuiltinSimprocNew (declName : Name) (key : Array SimpTheoremKey) (proc : Simproc) : IO Unit := do
|
||||
unless (← initializing) do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue