stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

Formatting only GADT with "indent 2" instead of "same_line"

Open 0xmycf opened this issue 1 year ago • 1 comments

SH formats my GADTs instead of this:

data Foo a where
  SomeA :: String -> Foo ()
  SomeB :: Bool   -> Foo String
  SomeC :: String -> Foo ()

like this:

data Foo a where SomeA :: String -> Foo ()
                 SomeB :: Bool -> Foo String
                 SomeC :: String -> Foo ()

This is probably due to this setting

  - records:
      equals: "same_line"
#   instead of 
#   equals: "indent 2"

Is there some way to distinguish between GADTs and normal records so I can keep the "same_line" option but format GADT with an indent?

0xmycf avatar Mar 05 '23 12:03 0xmycf