feat: add ImportM.runCoreM
This commit is contained in:
parent
e53ac503da
commit
c165317b28
1 changed files with 5 additions and 0 deletions
|
|
@ -317,4 +317,9 @@ def addAndCompile (decl : Declaration) : CoreM Unit := do
|
|||
addDecl decl;
|
||||
compileDecl decl
|
||||
|
||||
def ImportM.runCoreM (x : CoreM α) : ImportM α := do
|
||||
let ctx ← read
|
||||
let (a, _) ← x.toIO { options := ctx.opts, fileName := "<ImportM>", fileMap := default } { env := ctx.env }
|
||||
return a
|
||||
|
||||
end Lean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue