Curious if this is intentional or not, but the Roc formatter currently finds this first one to be totally fine:
Math :: [].{
double : U64 -> U64
double = |value| value * 2
triple : U64 -> U64
triple = |value| value * 3
}
Whereas I prefer this:
Math :: [].{
double : U64 -> U64
double = |value| value * 2
triple : U64 -> U64
triple = |value| value * 3
}
(not a big deal, I made my own extension to the formatter afterwards, just curious)
I prefer the second version too. @Chander Ramesh does the formatter also change the second version to the first one, or does it just leave it as is?
I prefer the second also
I feel like if there is an annotation, we should always format with a preceding empty line.
On the other hand when there is no annotation I like to group things without spaces sometimes like
first = ...
second = ...
third = ...
@Chander Ramesh would you like to make a GH issue for these formatter changes?
Luke Boswell said:
I prefer the second also
I feel like if there is an annotation, we should always format with a preceding empty line.
On the other hand when there is no annotation I like to group things without spaces sometimes like
first = ... second = ... third = ...
this use case is the reason we currently don't enforce a blank line
Anton said:
I prefer the second version too. Chander Ramesh does the formatter also change the second version to the first one, or does it just leave it as is?
Yup, it's okay with leaving it as it is currently; I have a small patch on my local formatter to mandate the second style.
Last updated: Sep 24 2026 at 15:59 UTC