From 3fd8896a72b3f91462dd4ba94a77d118f965e42a Mon Sep 17 00:00:00 2001 From: "U-Yuriy-PC\\Yuriy" Date: Sun, 5 Jul 2015 22:20:42 -0400 Subject: [PATCH 1/2] Add '{type|data} family' to font-lock-keywords-create --- haskell-font-lock.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/haskell-font-lock.el b/haskell-font-lock.el index b5cc663e9..0121e4f20 100644 --- a/haskell-font-lock.el +++ b/haskell-font-lock.el @@ -284,6 +284,12 @@ Returns keywords suitable for `font-lock-keywords'." (2 'haskell-keyword-face nil lax) (3 'haskell-keyword-face nil lax)) + ;; Special case for `type family' and `data family'. + ;; `family' is only reserved in these contexts. + ("\\<\\(type\\|data\\)[ \t]+\\(family\\>\\)" + (1 'haskell-keyword-face nil lax) + (2 'haskell-keyword-face nil lax)) + ;; Toplevel Declarations. ;; Place them *before* generic id-and-op highlighting. (,topdecl-var (1 'haskell-definition-face)) From 3b9e6ed0fc2e95270542a777e3d4104c7e63e3d5 Mon Sep 17 00:00:00 2001 From: "U-Yuriy-PC\\Yuriy" Date: Sun, 5 Jul 2015 22:42:17 -0400 Subject: [PATCH 2/2] Add 'family' keyword to doc-reserved-ids --- haskell-doc.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/haskell-doc.el b/haskell-doc.el index 3f1150124..eb3601c60 100644 --- a/haskell-doc.el +++ b/haskell-doc.el @@ -485,7 +485,8 @@ It is probably best to manipulate this data structure with the commands ("where" . "exp where { decl; ...; decl [;] }") ; check that ; see also class, instance, module ("as" . "import [qualified] modid [as modid] [impspec]") ("qualified" . "import [qualified] modid [as modid] [impspec]") - ("hiding" . "hiding ( import1 , ... , importn [ , ] )")) + ("hiding" . "hiding ( import1 , ... , importn [ , ] )") + ("family" . "(type family type [kind] [= type_fam_equations]) | (data family type [kind])")) "An alist of reserved identifiers. Each element is of the form (ID . DOC) where both ID and DOC are strings. DOC should be a concise single-line string describing the construct in which