fix: sorried errors in rpcServerMethod

This commit is contained in:
Wojciech Nawrocki 2022-05-22 14:43:32 -04:00 committed by Leonardo de Moura
parent c2fdcad443
commit 4972f214be

View file

@ -108,9 +108,10 @@ def registerRpcProcedure (method : Name) : CoreM Unit := do
throwError s!"{errMsg}: already registered"
let wrappedName := method ++ `_rpc_wrapped
let procT := mkConst ``RpcProcedure
let proc ← MetaM.run' <| TermElabM.run' <| do
let c ← Lean.Elab.Term.elabTerm (← `(wrapRpcProcedure $(quote method) _ _ $(mkIdent method))) procT
return ← instantiateMVars c
let proc ← MetaM.run' <| TermElabM.run' <| withoutErrToSorry do
let stx ← ``(wrapRpcProcedure $(quote method) _ _ $(mkIdent method))
let c ← Lean.Elab.Term.elabTerm stx procT
instantiateMVars c
addAndCompile <| Declaration.defnDecl {
name := wrappedName
type := procT