Skip to content

Commit 2ba5d29

Browse files
committed
Merge pull request #1045 from gracjan/pr-data-indentation
Cleanup tests with 'data' declaration indentation
2 parents 8ef95fe + 0b05e4c commit 2ba5d29

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

tests/haskell-indentation-tests.el

+15-19
Original file line numberDiff line numberDiff line change
@@ -502,40 +502,36 @@ instance (Monad m) ⇒ C m a where
502502
(2 2)
503503
(3 0 2))
504504

505-
(hindent-test "21a* fix \"let\" statement in \"do\" block""
505+
(hindent-test "21a fix \"let\" statement in \"do\" block""
506506
main :: IO ()
507507
main = do
508508
let foo = Foo {
509509
bar = 0
510-
, baz = 0"
510+
, baz = 0"
511511
(1 0)
512-
(2 0)
512+
(2 0 8)
513513
(3 2)
514514
(4 6)
515-
(5 4)
516-
(6 4))
515+
(5 6)
516+
(6 8))
517517

518-
(hindent-test "21b* fix named fields in \"data\" declaration""
518+
(hindent-test "21b fix named fields in \"data\" declaration""
519519
data Foo = Foo {
520520
bar :: Int
521-
, baz :: Int"
521+
, baz :: Int"
522522
(1 0)
523-
(2 4)
523+
(2 2)
524524
(3 2)
525-
(4 2))
525+
(4 4 11))
526526

527-
(hindent-test "21c* fix \"let\" statement and record in \"do\" block""
528-
main :: IO ()
529-
main = do
530-
let foo = Foo {
531-
bar = 0
532-
, baz = 0"
527+
(hindent-test "21c* \"data\" declaration open on next line" "
528+
data Foo = Foo
529+
{ bar :: Int
530+
, baz :: Int"
533531
(1 0)
534-
(2 0)
532+
(2 2)
535533
(3 2)
536-
(4 14)
537-
(5 12)
538-
(6 12))
534+
(4 4 11))
539535

540536
(hindent-test "22 should obey layout only outside parentheses" "
541537
func = 1234

0 commit comments

Comments
 (0)