Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
0xmycf opened this issue Mar 5, 2023 · 1 comment
Open

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

0xmycf opened this issue Mar 5, 2023 · 1 comment

Comments

@0xmycf
Copy link

0xmycf commented Mar 5, 2023

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?

@srgtmshnk
Copy link

weird, i cant even exec stylish-haskell with equals "same_line"

app/Effectful/Cereal.hs: <string>:68:41: error: parse error on input ::'

data BinGet :: Effect where
    GetWord8        (here):: BinGet m Word8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants