diff --git a/haskell-font-lock.el b/haskell-font-lock.el index 194291159..5bf500e4b 100644 --- a/haskell-font-lock.el +++ b/haskell-font-lock.el @@ -253,8 +253,10 @@ Returns keywords suitable for `font-lock-keywords'." (,topdecl-var (1 'haskell-definition-face)) (,topdecl-var2 (2 'haskell-definition-face)) (,topdecl-bangpat (1 'haskell-definition-face)) - (,topdecl-sym (2 'haskell-definition-face)) - (,topdecl-sym2 (1 'haskell-definition-face)) + (,topdecl-sym (2 (unless (member (match-string 2) '("\\" "=" "->" "→" "<-" "←" "::" "∷" "," ";" "`")) + 'haskell-definition-face))) + (,topdecl-sym2 (1 (unless (member (match-string 1) '("\\" "=" "->" "→" "<-" "←" "::" "∷" "," ";" "`")) + 'haskell-definition-face))) ;; These four are debatable... ("(\\(,*\\|->\\))" 0 'haskell-constructor-face) @@ -269,7 +271,8 @@ Returns keywords suitable for `font-lock-keywords'." (,conid 0 'haskell-constructor-face) - (,sym 0 (if (eq (char-after (match-beginning 0)) ?:) + (,sym 0 (if (and (eq (char-after (match-beginning 0)) ?:) + (not (member (match-string 0) '("::" "∷")))) 'haskell-constructor-face 'haskell-operator-face)))) keywords))