Skip to content

Commit f94a954

Browse files
committed
Parse scoped types in indentation - tests
1 parent dafa7bd commit f94a954

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

tests/haskell-indentation-tests.el

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,15 +524,37 @@ func = 1234
524524
-}"
525525
((3 2) 0))
526526

527-
(hindent-test "24* should parse inline type signatures properly" "
527+
(hindent-test "24 should parse inline type signatures properly" "
528528
foo = do
529529
_ :: String <- undefined
530530
_ :: String <- undefined
531531
return ()"
532532
((1 0) 0)
533533
((2 0) 2)
534-
((3 0) 2 17)
535-
((4 0) 2 17))
534+
((3 0) 0 2 17)
535+
((4 0) 0 2 17))
536+
537+
(hindent-test "25a* support scoped type declarations" "
538+
foo = do
539+
bar :: String
540+
-> String
541+
<- undefined"
542+
((1 0) 0)
543+
((2 0) 2)
544+
((3 0) 6 9)
545+
;; here it brakes, it would like to put '<-' on same line with 'bar'
546+
;; the culprit is the 'do' keyword
547+
((4 0) 4))
548+
549+
(hindent-test "25b support scoped type declarations" "
550+
foo = let
551+
bar :: String
552+
-> String
553+
= undefined"
554+
((1 0) 0)
555+
((2 0) 2)
556+
((3 0) 6 9)
557+
((4 0) 4))
536558

537559

538560
;;; haskell-indentation-tests.el ends here

0 commit comments

Comments
 (0)