Skip to content

Add comma list test for indentation #1198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2016
Merged
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
21 changes: 20 additions & 1 deletion tests/haskell-indentation-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ fun = [ x | y,
(2 12)
(3 0 6))

(hindent-test "6* \"let\" in list comprehension""
(hindent-test "6a* \"let\" in list comprehension""
fun = [ f | x <- xs
, y <- ys
, let c = 123
Expand All @@ -214,6 +214,25 @@ fun = [ f | x <- xs
(4 10)
(5 0 6))

(hindent-test "6b* \"let\" in list comprehension""
fun = [ f | x <- [1]
, y <- [2]
, let c, d :: Int
c = 123
d = 45
, f <- [x * y * c * d] ]"
;; this one is interesting because the comma betweed c
;; and d does not count as a comma for list
;; comprehension elements
(1 0)
(2 10)
(3 10)
(4 16)
(5 16)
(6 10)
(7 0 6))


(hindent-test "6u* \"let\" in list comprehension""
fun = [ f | x ← xs
, y ← ys
Expand Down