Commit b10df4de authored by Klaus Aehlig's avatar Klaus Aehlig Committed by Jose A. Lopes

Clarify spacing in record syntax

So far, our code base does not have a consistent way of spacing
records. To work towards more consistency, add a recommendation
into out style guide. We standardize on what seems most common
in the Haskell world and also is the dominant form in our code
base.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 7bd8ce44
......@@ -351,6 +351,18 @@ following is also allowed::
, value2
]
For records, always add spaces around the braces and the equality sign.
::
foo = Foo { fBar = "bar", fBaz = 4711 }
foo' = Foo { fBar = "bar 2"
, fBaz = 4712
}
node' = node { ip = "127.0.0.1" }
White space
~~~~~~~~~~~
Like in Python, surround binary operators with one space on either side. Do no
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment