lspitzner / brittany

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

Support formatting of sum types? #291

Open vaclavsvejcar opened 4 years ago

vaclavsvejcar commented 4 years ago

I'm really happy with data record types formatting in Brittany (as implemented in #161 - thank you very much @eborden), but it looks that we still don't have support for formatting sum types, such as for

data RunMode
  = Add
  | Drop
  | Replace
  deriving (Eq, Show)

Is there any plan to add support for this in recent future?

eborden commented 4 years ago

@vaclavsvejcar I have a branch with some of the work for this on it. I just haven't been able to get back to it. I'll get it back onto my todo list. It is something productive I can get done during social distancing.

eborden commented 4 years ago

Refreshed my old work and opened a PR over here. There is work left to do, but hopefully this gets this issue moving.

https://github.com/lspitzner/brittany/pull/294