lean4-htt/tests/lean/run/macro2.lean
Leonardo de Moura b6a1914299 chore: remove $. notation
It has been replaced by `|>.`
2020-11-19 08:47:35 -08:00

25 lines
354 B
Text

notation:50 a "**" b:50 => b * a * b
notation "~" a => a+a
namespace Foo
notation "~~" a => a+a
end Foo
syntax:60 term "+++" term:59 : term
syntax "<||" term "||>" : term
macro_rules
| `($a +++ $b) => `($a + $b + $b)
macro_rules
| `(<|| $x ||>) => `($x +++ 1 ** 2)
#check <|| 2 ||>
#check <|| ~2 ||>
#check <|| ~~2 ||>
#check <|| <|| 3 ||> ||>