lean4-htt/tests/lean/over_notation.lean
Leonardo de Moura e5298c9d8f feat(frontends/lean/elaborator): modify the pre-term for overloaded notation
The new encoding is better for the new elaborator.
2016-07-31 17:14:01 -07:00

17 lines
364 B
Text

constant f : nat → nat → nat
constant g : string → string → string
infix ` & `:60 := f
infix ` & `:60 := g
set_option pp.notation false
#elab 0 & 1
#elab "a" & "b"
#elab tt & ff
notation `[[`:max l:(foldr `, ` (h t, f h t) 0 `]]`:0) := l
notation `[[`:max l:(foldr `, ` (h t, g h t) "" `]]`:0) := l
#elab [[ (1:nat), 2, 3 ]]
#elab [[ "a", "b", "c" ]]