lean4-htt/tests/lean/notation2.lean
Daniel Selsam a9b01991c2 feat(frontends/lean/inductive_cmd): new frontend for the inductive cmd
Conflicts:
	src/frontends/lean/CMakeLists.txt
	src/frontends/lean/structure_cmd.h
2016-08-17 07:34:03 -07:00

5 lines
265 B
Text

--
inductive List (T : Type) : Type | nil {} : List | cons : T → List → List open List notation h :: t := cons h t notation `[` l:(foldr `,` (h t, cons h t) nil) `]` := l
infixr `::` := cons
check (1:num) :: 2 :: nil
check (1:num) :: 2 :: 3 :: 4 :: 5 :: nil