aboutsummaryrefslogtreecommitdiff
path: root/doc/coding_style.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-10-31 12:39:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-10-31 12:41:08 -0400
commit87fe9d25b9bce6c113c1bb7293a982e12ba152f0 (patch)
treefb0f904cea482a08aaa54be164aa0cd2ab0ba896 /doc/coding_style.mdwn
parentb2eb5ad2c5d1488b91c83c35431b32602b1f8c13 (diff)
add example multiline data constructor
Diffstat (limited to 'doc/coding_style.mdwn')
-rw-r--r--doc/coding_style.mdwn8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/coding_style.mdwn b/doc/coding_style.mdwn
index 101ac4f58..6968c9958 100644
--- a/doc/coding_style.mdwn
+++ b/doc/coding_style.mdwn
@@ -72,6 +72,14 @@ that line up with the open and close punctuation.
, address = "baz"
}
+Similarly, data structures line up the leading `=` with the following `|`
+
+ data Foo
+ = Bar
+ | Baz
+ | Quux Foo
+ deriving (Eq, Ord)
+
Module imports are separated into two blocks, one for third-party modules,
and one for modules that are part of git-annex. (Additional blocks can be used
if it makes sense.)