-
Notifications
You must be signed in to change notification settings - Fork 347
haskell-indentation should line up function arguments #813
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
Comments
Aside from any concerns about layout rules, it's just not what I want, and it seems I'm not alone. |
I posted this as an issue on StackOverflow. I got an overwhelming amount of responses saying they also had the same issue. So it seems I'm not alone either. http://stackoverflow.com/questions/32016807/haskell-indentation-doesnt-line-up-function-arguments The responses on SO were the motivation to open it as a ticket here |
Stackoverflow question has 5 comments, one of those is 'I have the same issues', other four try to be helpful. |
And eight upvotes. Most people don't bother commenting on the issue, they just upvote it if they think it's a good question or if they have a similar problem |
@ElectricCoffee, currently I've contributed too and Look at number of issues here! At the same time there are not so many active contributors, so it will not start work smoothly by itself. |
I'd love to contribute, but unfortunately I don't know anywhere near enough Emacs lisp at the moment to provide any sort of useful contributions. I'm glad it's being looked at at least. I'll try and contribute when I feel comfortable enough with my knowledge of how elisp and the emacs api is put together. |
Style mentioned here seems to be mostly used in data declarations, for example in data IntMap a = Bin {-# UNPACK #-} !Prefix
{-# UNPACK #-} !Mask
!(IntMap a)
!(IntMap a)
| Tip {-# UNPACK #-} !Key a
| Nil https://github.com/haskell/containers/blob/master/Data/IntMap/Base.hs#L277-L283 I wasn't able to find a real life example for function arguments alignment. Note that |
Duplicate of #82. |
Emacs will consistently do this: (
□
= the other indent point(s))Instead of doing this:
When putting arguments on a line of their own, this could lead to some edge cases where the code gets evaluated wrong due to the indentation level not being correct
As an example:
Would be interpreted as
foo = do { maybe arg1; arg2 }
While
Would be interpreted as
foo = do { maybe arg1 arg2 }
The text was updated successfully, but these errors were encountered: