Skip to content

Commit

Permalink
Explain how to indent case expressions. Closes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
tibbe committed Aug 11, 2012
1 parent 744e395 commit b96c29b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions haskell-style.md
Expand Up @@ -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
-------

Expand Down

0 comments on commit b96c29b

Please sign in to comment.