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

"=>" is not indented as "->" nor "::"

Open yaitskov opened this issue 5 years ago • 1 comments

Hi,

"=> is not indented as "->" in function type signature and there is no obvious way to achieve this through customize-variable.

Expected unified indentation

foo 
    :: (Monad m)
    => Int
    -> m String

Actual indentation

foo 
    :: (Monad m)
       => Int
    -> m String

yaitskov avatar Jul 28 '20 19:07 yaitskov

I'm inclined to agree that your expected result might be nicer, but I don't think the goal of the indentation code was to allow customisation of the resulting style, rather more to ensure syntactic validity. Also the indentation code is not at all easy to work on. My personal suggestion would be to use a code reformatter like ormolu.

purcell avatar Jul 28 '20 20:07 purcell