Note that it does not use `MetaEval` to execute the term of type `CommandEval`. Thus, we can now use `#eval` to execute simple commands. see #1256
16 lines
251 B
Text
16 lines
251 B
Text
import Lean
|
|
|
|
open Lean Elab Command
|
|
|
|
#eval do
|
|
let id := mkIdent `foo
|
|
elabCommand (← `(def $id := 10))
|
|
|
|
example : foo = 10 := rfl
|
|
|
|
#eval do
|
|
let id := mkIdent `boo
|
|
elabCommand (← `(def $id := false))
|
|
return 5
|
|
|
|
example : boo = false := rfl
|