lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
691 stars 67 forks source link

Indent policy left not respected for LHS parens #254

Open eborden opened 5 years ago

eborden commented 5 years ago

Indent policy left is not being respected when the RHS of an operator is within parenthesis.

compare

foo = do
  this expression
    <$$> this
    . is
    . a
    . long
    . composition
    . with
    . many
    . functions
    . with
    . parenthesis

to

foo = do
  this expression
    <$$> (this
         . is
         . a
         . long
         . composition
         . with
         . many
         . functions
         . with
         . parenthesis
         )

For indent policy left the above should be:

foo = do
  this expression
    <$$>
      ( this
      . is
      . a
      . long
      . composition
      . with
      . many
      . functions
      . with
      . parenthesis
      )