@@ -646,18 +646,16 @@ For example
646
646
647
647
(defun haskell-indentation-data ()
648
648
" Parse data or type declaration."
649
- (haskell-indentation-with-starter
650
- (lambda ()
651
- (when (string= current-token " instance" )
652
- (haskell-indentation-read-next-token))
653
- (haskell-indentation-type)
654
- (cond ((string= current-token " =" )
655
- (haskell-indentation-with-starter
656
- (apply-partially #'haskell-indentation-separated
657
- #'haskell-indentation-type " |" " deriving" )))
658
- ((string= current-token " where" )
659
- (haskell-indentation-with-starter
660
- #'haskell-indentation-expression-layout nil ))))))
649
+ (haskell-indentation-read-next-token)
650
+ (when (string= current-token " instance" )
651
+ (haskell-indentation-read-next-token))
652
+ (haskell-indentation-type)
653
+ (cond ((string= current-token " =" )
654
+ (haskell-indentation-separated
655
+ #'haskell-indentation-expression " |" " deriving" ))
656
+ ((string= current-token " where" )
657
+ (haskell-indentation-with-starter
658
+ #'haskell-indentation-expression-layout nil ))))
661
659
662
660
(defun haskell-indentation-import ()
663
661
" Parse import declaration."
@@ -927,7 +925,9 @@ layout starts."
927
925
(cond ((member current-token '(layout-item " ;" ))
928
926
(haskell-indentation-read-next-token))
929
927
((eq current-token 'end-tokens )
930
- (when (or (haskell-indentation-expression-token-p following-token)
928
+ (when (or (and
929
+ (not (string= following-token " {" ))
930
+ (haskell-indentation-expression-token-p following-token))
931
931
(string= following-token " ;" )
932
932
(and (equal layout-indent 0 )
933
933
(member following-token (mapcar #'car haskell-indentation-toplevel-list))))
0 commit comments