Do you have a good reason for enforcing trailing commas vs leading?
Prelude> [1,]
<interactive>:4:4: error: parse error on input ‘]’
Prelude> [1]
[1]
This means if you go multiline in the "usual" style: [
1,
2,
3
]
any time you need to append a new item, you need to modify the existing last line as well: [
1,
2,
- 3
+ 3,
+ 4
]
Meanwhile: [ 1
, 2
, 3
+, 4
]
If you support trailing commas, you can just use one on the last line for the same effect: [
1,
2,
3,
+ 4,
]
Incidentally, some crazy people put the closing symbol on the last line: [ 1
, 2
, 3 ]
That completely defeats the point: [ 1
, 2
-, 3 ]
+, 3
+, 4 ]something like `[hello, world]` should probably be allowed since `[hello, world,]` feels extraneous.