@@ -530,7 +530,7 @@ and indent when all of the following are true:
530
530
`((" ::" .
531
531
,(apply-partially 'haskell-indentation-with-starter
532
532
(apply-partially 'haskell-indentation-separated
533
- 'haskell-indentation-type " ->" )))
533
+ 'haskell-indentation-type '( " ->" " => " ) )))
534
534
(" (" .
535
535
,(apply-partially 'haskell-indentation-list
536
536
'haskell-indentation-type " )" " ," ))
@@ -651,14 +651,16 @@ After a lambda (backslash) there are two possible cases:
651
651
(catch 'return
652
652
(while t
653
653
(cond
654
- ((member current-token '(value operator " ->" ))
654
+ ((member current-token '(value operator " ->" " => " ))
655
655
(haskell-indentation-read-next-token))
656
656
657
657
((eq current-token 'end-tokens )
658
658
(when (member following-token
659
659
'(value operator no-following-token
660
660
" (" " [" " {" " ::" ))
661
- (haskell-indentation-add-indentation current-indent)
661
+ (if (equal following-token " =>" )
662
+ (haskell-indentation-add-indentation starter-indent)
663
+ (haskell-indentation-add-indentation current-indent))
662
664
(haskell-indentation-add-indentation left-indent))
663
665
(throw 'return nil ))
664
666
(t (let ((parser (assoc current-token haskell-indentation-type-list)))
@@ -671,13 +673,13 @@ After a lambda (backslash) there are two possible cases:
671
673
(let ((current-indent (current-column )))
672
674
(catch 'return
673
675
(cond
674
- ((member current-token '(value operator " ->" ))
676
+ ((member current-token '(value operator " ->" " => " ))
675
677
(haskell-indentation-read-next-token))
676
678
677
679
((eq current-token 'end-tokens )
678
680
(when (member following-token
679
681
'(value operator no-following-token
680
- " ->" " (" " [" " {" " ::" ))
682
+ " ->" " => " " (" " [" " {" " ::" ))
681
683
(haskell-indentation-add-indentation current-indent))
682
684
(throw 'return nil ))
683
685
(t (let ((parser (assoc current-token haskell-indentation-type-list)))
@@ -692,7 +694,7 @@ For example
692
694
let x :: Int = 12
693
695
do x :: Int <- return 12"
694
696
(haskell-indentation-with-starter
695
- (apply-partially #'haskell-indentation-separated #'haskell-indentation-type " ->" ))
697
+ (apply-partially #'haskell-indentation-separated #'haskell-indentation-type '( " ->" " => " ) ))
696
698
(when (member current-token '(" <-" " =" ))
697
699
(haskell-indentation-statement-right #'haskell-indentation-expression )))
698
700
@@ -1206,9 +1208,9 @@ line."
1206
1208
(match-string-no-properties 1 ))
1207
1209
((looking-at " [][(){}[,;]" )
1208
1210
(match-string-no-properties 0 ))
1209
- ((looking-at " \\ (\\\\\\ |->\\ |<-\\ |::\\ |=\\ ||\\ )\\ ([^-:!#$%&*+./<=>?@\\\\ ^|~]\\ |$\\ )" )
1211
+ ((looking-at " \\ (\\\\\\ |->\\ |<-\\ |::\\ |=\\ ||\\ |=> \\ )\\ ([^-:!#$%&*+./<=>?@\\\\ ^|~]\\ |$\\ )" )
1210
1212
(match-string-no-properties 1 ))
1211
- ((looking-at " \\ (→\\ |←\\ |∷\\ )\\ ([^-:!#$%&*+./<=>?@\\\\ ^|~]\\ |$\\ )" )
1213
+ ((looking-at " \\ (→\\ |←\\ |∷\\ |⇒ \\ )\\ ([^-:!#$%&*+./<=>?@\\\\ ^|~]\\ |$\\ )" )
1212
1214
(let ((tok (match-string-no-properties 1 )))
1213
1215
(or (cdr (assoc tok haskell-indentation-unicode-tokens)) tok)))
1214
1216
((looking-at" [-:!#$%&*+./<=>?@\\\\ ^|~`]" )
0 commit comments