
30 Jun
2021
30 Jun
'21
3 a.m.
Ok thank you for the feedback, I get the message not to re-purpose currently valid syntax. For that reason, this won't fly: I see no technical issues in allowing
something like `[ x, y || ys]`
`||` is already an operator in the Prelude.
[x, y ,: ys ] -- ? not currently valid
We could make list syntax work harder
[x, y ,:+ ys ]
Means desugar the commas by applying constructor `:+` instead of `:`. That could be in general any constructor starting `:`. Or indeed could be a pattern synonym starting `:`, which is a 'smart constructor' to build the list maintaining some invariant.