@@ -155,7 +155,13 @@ font faces assigned as if respective mode was enabled."
155
155
;;;### autoload
156
156
(defface haskell-pragma-face
157
157
'((t :inherit font-lock-preprocessor-face ))
158
- " Face used to highlight Haskell pragmas."
158
+ " Face used to highlight Haskell pragmas ({-# ... #-})."
159
+ :group 'haskell-appearance )
160
+
161
+ ;;;### autoload
162
+ (defface haskell-liquid-haskell-annotation-face
163
+ '((t :inherit haskell-pragma-face))
164
+ " Face used to highlight LiquidHaskell annotations ({-@ ... @-})."
159
165
:group 'haskell-appearance )
160
166
161
167
;;;### autoload
@@ -512,14 +518,23 @@ like ::, class, instance, data, newtype, type."
512
518
(equal (string-to-syntax " <" ) (syntax-after (point ))))
513
519
'haskell-literate-comment-face )
514
520
; ; Detect pragmas. A pragma is enclosed in special comment
515
- ; ; delimeters {-# .. #-}.
521
+ ; ; delimiters {-# .. #-}.
516
522
((save-excursion
517
523
(goto-char (nth 8 state))
518
524
(and (looking-at-p " {-#" )
519
525
(forward-comment 1 )
520
526
(goto-char (- (point ) 3 ))
521
527
(looking-at-p " #-}" )))
522
528
'haskell-pragma-face )
529
+ ; ; Detect Liquid Haskell annotations enclosed in special comment
530
+ ; ; delimiters {-@ .. @-}.
531
+ ((save-excursion
532
+ (goto-char (nth 8 state))
533
+ (and (looking-at-p " {-@" )
534
+ (forward-comment 1 )
535
+ (goto-char (- (point ) 3 ))
536
+ (looking-at-p " @-}" )))
537
+ 'haskell-liquid-haskell-annotation-face )
523
538
; ; Haddock comment start with either "-- [|^*$]" or "{- ?[|^*$]"
524
539
; ; (note space optional for nested comments and mandatory for
525
540
; ; double dash comments).
0 commit comments