tibbe / haskell-style-guide

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

"="-indentation in guards #7

Closed ghost closed 12 years ago

ghost commented 12 years ago

I like to write

foo x
  | thisIsAVeryLongConditionFunctionFooBarBazLoremIpsum x
  = thisIsProbablyAlsoAVeryLongFunction x
  | otherwise
  = bar x

That is, I like indenting the = in the same level as |. IMO that should be fine since it looks nice and is well-aligned.

For this reason, I request adding this to the style-guide.

tibbe commented 12 years ago

We already have a way to format code like this:

foo x
  | thisIsAVeryLongConditionFunctionFooBarBazLoremIpsum x =
      thisIsProbablyAlsoAVeryLongFunction x
  | otherwise =
      bar x

I don't want to add another.