Calling an align on
test :: Int -> Int -> Int
test x y = x
test x y     = y
gives
test     :: Int -> Int -> Int
test x y = x
test x y = y
I have looked briefly and I haven't found any Haskell code that uses this indentation style. I believe it should give
test :: Int -> Int -> Int
test x y = x
test x y = y
I have created  a patch that changes
- haskell-indent-start-of-defto discard type lines (note:- start-of-defis only called when P-ARG is nil)
- haskell-indent-align-guards-and-rhsto take a universal argument that switches on the P-ARG argument to- haskell-indent-align-def
Result:
- to include type definitions in alignment prefix C-u
Thoughts?
There are other places in the alignment code that this could be changed. However I wanted to keep this fix simple and I didn't want to forbid aligning of code like
test :: Int
testSecond :: Int
to
test       :: Int
testSecond :: Int