for coding style, it’s currently a bit of a mess, and is just best judgement based on nearby code.
I try to use these rules myself:
for files that were copied from elm-compiler, touch them as little as possible, and try to keep the same formatting style as the originals (so that they’re easier to compare with future updates to elm-compiler)
for other files, if I’m changing some code, sometimes I will update the formatting of the code right around it, but I try to avoid reformatting code in a PR that’s unrelated to the code change
add type annotations for anything newly hand-written that’s top-level
and I guess the style I’ve been sort of using for new code is: 4-space indents, using LambdaCase when possible, and:
if p
then x
else y
let
f = x
in
body
f x y =
do
...
for coding style, it’s currently a bit of a mess, and is just best judgement based on nearby code.
I try to use these rules myself:
and I guess the style I’ve been sort of using for new code is: 4-space indents, using LambdaCase when possible, and: