Skip to content

Commit 553ff12

Browse files
committed
Merge pull request #919 from gracjan/pr-parse-toplevel-better
Toplevel indentation bugfixes for data, newtype, instance
2 parents 7eb9833 + d4ab793 commit 553ff12

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

haskell-indentation.el

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -679,15 +679,9 @@ the current buffer."
679679

680680
(defconst haskell-indentation-toplevel-list
681681
`(("module" . haskell-indentation-module)
682-
("data" .
683-
,(apply-partially 'haskell-indentation-statement-right
684-
'haskell-indentation-data))
685-
("type" .
686-
,(apply-partially 'haskell-indentation-statement-right
687-
'haskell-indentation-data))
688-
("newtype" .
689-
,(apply-partially 'haskell-indentation-statement-right
690-
'haskell-indentation-data))
682+
("data" . haskell-indentation-data)
683+
("type" . haskell-indentation-data)
684+
("newtype" . haskell-indentation-data)
691685
("class" . haskell-indentation-class-declaration)
692686
("instance" . haskell-indentation-class-declaration))
693687
"Alist of toplevel keywords with associated parsers.")

tests/haskell-indentation-tests.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ class Foo a where
613613
instance Bar Int
614614
"
615615
((2 0) 0))
616-
(hindent-test "32* allow type operators" "
616+
(hindent-test "32 allow type operators" "
617617
data (:.) a b = a :. b
618618
"
619619
((2 0) 0 16))

0 commit comments

Comments
 (0)