Permalink
Browse files

Explain how to indent case expressions. Closes #8

  • Loading branch information...
1 parent 744e395 commit b96c29be8d73195e952a6337422cd360ac89e580 @tibbe committed Aug 11, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 haskell-style.md
View
@@ -200,6 +200,27 @@ foo = do
addCycles 1
```
+### Case expressions
+
+The alternatives in a case expression can be indented using either of
+the two following styles:
+
+```haskell
+foobar = case something of
+ Just j -> foo
+ Nothing -> bar
+```
+
+or as
+
+```haskell
+foobar = case something of
+ Just j -> foo
+ Nothing -> bar
+```
+
+Align the `->` arrows when it helps readability.
+
Imports
-------

0 comments on commit b96c29b

Please sign in to comment.