@Kha I suspect the memory leaks reported at the CI are due to an exception produced by the compiler. The compiler is currently a mix of Lean and C++ code. I think the exception was thrown from C++ code, crossed Lean code (producing memory leaks), and was caught by the old frontend written in C++. We will eventually replace the compiler C++ code with Lean code. So, I think this is a low priority issue.
17 lines
239 B
Text
17 lines
239 B
Text
import Lean
|
|
|
|
namespace Lean
|
|
|
|
def ex1 : CoreM Nat := do
|
|
env ← getEnv;
|
|
pure $ privateExt.getState env
|
|
|
|
#eval ex1
|
|
|
|
def ex2 : CoreM Nat := do
|
|
env ← getEnv;
|
|
pure $ { privateExt with idx := 3 }.getState env -- Error
|
|
|
|
-- #eval ex2
|
|
|
|
end Lean
|