Skip to content

Commit 3a4bc6e

Browse files
committed
Special case bang pattern for font-lock.
Make definition like func !b highlight like bang pattern not like a definition of (!) operator.
1 parent 8d1454d commit 3a4bc6e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

haskell-font-lock.el

+3
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,8 @@ Returns keywords suitable for `font-lock-keywords'."
364364
"\\(" varid "\\|" conid "\\|::\\|∷\\|=\\||\\|\\s(\\|[0-9\"']\\)"))
365365
(topdecl-var2
366366
(concat line-prefix "\\(" varid "\\|" conid "\\)\\s-*`\\(" varid "\\)`"))
367+
(topdecl-bangpat
368+
(concat line-prefix "\\(" varid "\\)\\s-*!"))
367369
(topdecl-sym
368370
(concat line-prefix "\\(" varid "\\|" conid "\\)\\s-*\\(" sym "\\)"))
369371
(topdecl-sym2 (concat line-prefix "(\\(" sym "\\))"))
@@ -419,6 +421,7 @@ Returns keywords suitable for `font-lock-keywords'."
419421
;; Place them *before* generic id-and-op highlighting.
420422
(,topdecl-var (1 haskell-definition-face))
421423
(,topdecl-var2 (2 haskell-definition-face))
424+
(,topdecl-bangpat (1 haskell-definition-face))
422425
(,topdecl-sym (2 haskell-definition-face))
423426
(,topdecl-sym2 (1 haskell-definition-face))
424427

0 commit comments

Comments
 (0)