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

Scoped type annotations break indentation #862

Closed
arybczak opened this issue Sep 10, 2015 · 1 comment
Closed

Scoped type annotations break indentation #862

arybczak opened this issue Sep 10, 2015 · 1 comment

Comments

@arybczak
Copy link

The following code fragment break haskell-indentation-mode:

foo = do
  _ :: String <- undefined
  _ :: String <- undefined

When you scroll to the line with the second bind and press enter, emacs displays Illegal token: <- and refuses to go to the next line (which in itself is a big problem, see #861).

@gracjan
Copy link
Contributor

gracjan commented Sep 12, 2015

We can either:

  • cover up by swallowing all exceptions and pretend that nothing happened
  • make it so that every stream of letters is accepted as input and 'Illegal token' is never thrown

I would like to go the second route as it is more manageable.

The specific issue here is that type operator :: is treated too special in indentation when it should not be so. That is architecture problem that should be solved by treating all operators same unless in contexts where it makes sense to do otherwise.

@gracjan gracjan changed the title A specific code fragment breaks indentation Scoped type annotations break indentation Sep 14, 2015
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