lean4-htt/tests/lean/evalCmd.lean
Leonardo de Moura 467ac9d98a feat: add support for CommandElabM at #eval
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
2022-06-29 16:34:49 -07:00

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