Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Explain how to indent case expressions. Closes #8

  • Loading branch information...
commit b96c29be8d73195e952a6337422cd360ac89e580 1 parent 744e395
@tibbe authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 haskell-style.md
View
21 haskell-style.md
@@ -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
-------
Please sign in to comment.
Something went wrong with that request. Please try again.