Skip to content

Commit c02405c

Browse files
committed
Array spellings
1 parent 3e282d6 commit c02405c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Init/Data/Array/Basic.lean

+4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ universe u v w
1818

1919
/-! ### Array literal syntax -/
2020

21+
/-- Syntax for `Array α`. -/
2122
syntax "#[" withoutPosition(sepBy(term, ", ")) "]" : term
2223

2324
macro_rules
2425
| `(#[ $elems,* ]) => `(List.toArray [ $elems,* ])
2526

27+
recommended_spelling "#[]" "empty" «term#[_,]»
28+
recommended_spelling "#[x]" "singleton" «term#[_,]»
29+
2630
variable {α : Type u}
2731

2832
namespace Array

0 commit comments

Comments
 (0)