Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions haskell-indentation.el
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,10 @@ For example
(haskell-indentation-add-indentation current-indent)
(throw 'parse-end nil)))
((string= current-token "=")
(haskell-indentation-separated
#'haskell-indentation-expression "|" "deriving"))
(haskell-indentation-with-starter
(lambda ()
(haskell-indentation-separated
#'haskell-indentation-expression "|" "deriving"))))
((string= current-token "where")
(haskell-indentation-with-starter
#'haskell-indentation-expression-layout nil))))
Expand Down
10 changes: 5 additions & 5 deletions tests/haskell-indentation-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ instance Bar Int
(hindent-test "32 allow type operators" "
data (:.) a b = a :. b
"
(2 0 2))
(2 0 16))

(hindent-test "33* parse #else in CPP" "
#ifdef FLAG
Expand All @@ -681,7 +681,7 @@ data T = T {
}

"
(5 0 2))
(5 0 9))

(hindent-test "35 baroque construct which causes parse error" "
az = Projection
Expand Down Expand Up @@ -854,7 +854,7 @@ newtype instance T Char = TC Bool"
(1 0)
(2 0)
(3 0)
(4 0 2))
(4 0 26))

(hindent-test "52a* module simplest case two lines" "
module A.B
Expand Down Expand Up @@ -896,13 +896,13 @@ foo x
(2 2)
(3 2))

(hindent-test "55* data constructor on separate line" "
(hindent-test "55 data constructor on separate line" "
data Foo = Bar
| Baz"
(1 0)
(2 9))

(hindent-test "55a* deriving below aligned data constructors" "
(hindent-test "55a deriving below aligned data constructors" "
data Foo = Bar
| Baz
deriving (Show)"
Expand Down