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

[Feature request]: White space format support.

Open evan0greenup opened this issue 6 years ago • 2 comments

main           =                                    putStrLn "Hello World"

This is a valid statement in haskell. But there is no change when I type stylish-haskell -i helloworld.hs.

I was wondering if it is possible to add white space formatting support in stylish-haskell.

evan0greenup avatar Apr 08 '19 01:04 evan0greenup

Would you like to see that in a function definition only or there are other places that this would make sense? Would you be willing to contribute by providing a tests that you would hope to pass? This way we can crisply define what feature exactly are you looking for.

EncodePanda avatar Jan 23 '20 22:01 EncodePanda

@EncodePanda Hi! I think this test make sense:

f :: Int ->       Int ->Int
f a b=a +b

should becomes

f :: Int -> Int -> Int
f a b = a + b

after apply stylish-haskell to it with the default config.

What do you think about adding this feature? I plan to implement this, any advice?

VitalyAnkh avatar Sep 09 '22 20:09 VitalyAnkh