I'm using Emacs as my main Haskell editor, and as such, I of course use haskell-mode as the main mode for editing Haskell code.
Now for whatever reason, haskell-indentation doesn't offer an indent point for function arguments.
What I mean is that Emacs will consistently do this: (□ is the other indent point(s))
myFunction = maybe arg1
□ arg2
□ arg3
Instead of doing this:
myFunction = maybe arg1
□ □ arg2
□ □ arg3
Sometimes I need to break functions up onto multiple lines due to the lines getting too long, but not having haskell-mode offer the right indent level is bugging me some.
Anything I can do to alleviate this?
Edit
Seeing as I'm not the only one with this issue, I've opened a ticket on the haskell-mode github page [here]
let/do/where/ofappears; and even within a layout context, as long as you don't decrease your indent so thatarg1is indented by less than themaybeis, you run no risk of confusing the indentation.turn-on-haskell-simple-indentand then do the right level indent.foo = do maybe arg1\n.........arg2would be interpreted very differently fromfoo = do maybe arg1\n...............arg2, even though in neither case does the indentation decrease. (The former would befoo = do { maybe arg1; arg2 }while the latter would correctly befoo = do { maybe arg1 arg2 }.haskell-indent(as opposed tohaskell-indentation) gets this one right.