test(lean): add simple example of notation implemented using Lua
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3ea24c0f32
commit
813e033f54
1 changed files with 15 additions and 0 deletions
15
tests/lean/run/n1.lean
Normal file
15
tests/lean/run/n1.lean
Normal file
|
@ -0,0 +1,15 @@
|
|||
variable A : Type.{1}
|
||||
variable a : A
|
||||
variable g : A → A
|
||||
variable f : A → A → A
|
||||
|
||||
(*
|
||||
function foo()
|
||||
return Const("g")(parse_expr())
|
||||
end
|
||||
*)
|
||||
|
||||
notation `tst` c1:(call foo) `with` c2:(call foo) := f c1 c2
|
||||
notation `simple` c:(call foo) := c
|
||||
variable b : A
|
||||
check tst (simple b) with a
|
Loading…
Add table
Reference in a new issue