Please help me set up proper indentation in Emacs haskell-mode
When I’m trying to type down something like ADT or a record, I’m getting on the wrong column after pressing <ENTER>, and pressing <TAB> won’t switch to the right one until I enter either | or ‘;’!
data MyADT = Oh
| Hi
| Hello
| <- the cursor is here again!
Trying to solve the problem I set
(define-key global-map (kbd "RET") 'reindent-then-newline-and-indent)
in my .emacs file, but it won’t indent the current line on pressing <enter> too!
Another strange behaviour: indentation of case
oneChar c = case lookup c simpleEscapes of
| <- what? here?!
I commented the line
And now I’m getting a good “tab” behavior: at least, it allows me to choose a column and does not tie down me to the one it likes. But no auto-indent at all annoys me a little bit, so I’m hoping it is a temporary solution