You can clone with
I have a major issue with indentation in this mode. For any medium-sized code file, hitting [TAB] or [RET] takes a second or even more to complete, which unfortunately makes this feature completely useless. I revert to manually indent because it takes too long to cycle the indentations to pick the correct one.
What could be going wrong? I ran the latest haskell-mode with no other packages interfering.
Which actual mode? haskell-indentation or haskell-indent?
Another option is haskell-simple-indent which doesn't have any indentation cycle.
The mode is haskell-indentation. haskell-indent is fast, but it does not indent the way I like it (for exaple, line up correctly in do block after newline, which haskell-indentation does correctly, but too slow). simple-indent is also no solution, because the only things I really need from a haskell mode are syntax highlighting and good indentation.
I use (and now and then fight with :p) haskell-indentation as well, but haven't noticed any noticeable lags myself; maybe it's just having trouble parsing your file?
I just noticed that it only happens when I have many lines in a where-clause, e.g.:
someFunction = foo
-- a few hundred lines of definitions here
Are you familiar with the code-base of haskell-indentation.el?
Nope, not at all :)
I don't use any of the indentation modes, if someone wants to take ownership of this issue, please do. Otherwise @benma should notify the author of the mode and close this. See also: #145.
I am the (original) author of haskell-indentation.el. What it does is, it traces back to the beginning of the expression by looking at the indentation, and then it parses the whole expression. It's slow, but it's also more accurate (usually). If you have an expression of a hundred lines long, then it will take much longer to find the correct indentation. I don't see an easy solution for this. Make sure that you use the byte-compiled version of haskell-indentation.