tibbe / haskell-style-guide

A style guide for Haskell code.
959 stars 75 forks source link

case expressions #8

Closed ghost closed 12 years ago

ghost commented 12 years ago

The style guide doesn't yet describe how to align case expressions.

tibbe commented 12 years ago

Do you mean how you align the arrows?

ghost commented 12 years ago

I mean how deep to indent the cases of the case expression.

For instance:

 foobar = function $ case something of
     Just j -> foo
     Nothing -> bar

or

 foobar = function $ case something of
              Just j -> foo
              Nothing -> bar

or

 foobar = function $ case something of
                         Just j -> foo
                         Nothing -> bar

or

 foobar = function $ case something of
                          Just j -> foo
                          Nothing -> bar