Skip to content

indentation-mode wrong with tuples #835

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

Closed
rietmann opened this issue Aug 28, 2015 · 4 comments · Fixed by #846
Closed

indentation-mode wrong with tuples #835

rietmann opened this issue Aug 28, 2015 · 4 comments · Fixed by #846

Comments

@rietmann
Copy link
Contributor

The following test example doesn't indent correctly with indentation-mode with the newest version

main = do
  let (a,b) = (1,2) :: (Int, Int)
      test = 4
             (c,d) = (4,3)
      ^
      |
      desired indent

I understand that haskell-indentation is undergoing quite some work, but I thought I would add another issue to fix and add to the test suite. Thanks!

@vwyu
Copy link
Contributor

vwyu commented Aug 28, 2015

It seems that the problem may be related to the type annotiation ending with ")".

The following test case has the same issue:

main = do
  let a = "1" :: (String)
      b = 2
          c = 3

@vwyu
Copy link
Contributor

vwyu commented Aug 28, 2015

Another test case that fails:

main = do
  let a = (putStrLn "1") :: IO ()
      b = 2
          c = 3

@geraldus
Copy link
Contributor

Nice catch. @vwyu can you give a try to make a PR fixing this?

@gracjan
Copy link
Contributor

gracjan commented Aug 28, 2015

Even a pr with just a failing test case would be great. The file to edit is tests/haskell-indentation-mode-tests.el.

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

Successfully merging a pull request may close this issue.

4 participants