lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
690 stars 72 forks source link

Weird formatting of case expressions in lists #227

Open expipiplus1 opened 5 years ago

expipiplus1 commented 5 years ago
-- Weird placement of 'of' in line with the list commas
foo = bar
  [ case
    foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
  of
    () -> ()
  , ()
  ]

-- Doesn't occur if this is a singleton list
foo = bar
  [ case
      foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
    of
      () -> ()
  ]

-- Doesn't occur if this list is not an argument to a function ('bar' above)
foo =
  [ case
      foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
    of
      () -> ()
  , ()
  ]
tfausak commented 5 years ago

Seems related to #232.