roc
roc copied to clipboard
Format tuples
This is part of the SIMD proposal, and comes after https://github.com/rtfeldman/roc/issues/2932
Tuples should be formatted the same way as they are in Rust: spaces after the comma but no spaces before the parentheses (e.g. (foo, bar, baz).
Nested multiline tuples should be formatted like so:
matrix = Matrix4x4.new
((5, 4, 7, 8),
(9, 0, 1, 2),
(3, 4, 5, 6),
(7, 8, 9, 0))
Notice that each line after the first is indented by one space (to account for the enclosing ( on the first line).
This is important so that matrices made up of tuples look nice!