@@ -36,7 +36,12 @@ syn match haskellTypeSig
36
36
\ haskellParens
37
37
syn keyword haskellWhere where
38
38
syn keyword haskellLet let
39
- syn match HaskellDerive " \< deriving\>\(\s\+\<\( anyclass\| instance\| newtype\| stock\)\>\)\? "
39
+ syn keyword haskellDeriveKeyword deriving anyclass instance newtype stock via contained
40
+ syn match haskellDerive " deriving\(\s\+ instance\)\?\(\s\+ anyclass\|\s\+ newtype\|\s\+ stock\|\s\+ .\{ -}\_ s\+ via\)\? "
41
+ \ contains=
42
+ \ haskellDeriveKeyword,
43
+ \ haskellParens,
44
+ \ haskellType
40
45
syn keyword haskellDeclKeyword module class instance newtype in
41
46
syn match haskellDecl " \<\( type\| data\)\>\s\+\(\< family\>\)\? "
42
47
syn keyword haskellDefault default
@@ -161,13 +166,13 @@ highlight def link haskellType Type
161
166
highlight def link haskellImportKeywords Include
162
167
if get (g: , ' haskell_classic_highlighting' , 0 )
163
168
highlight def link haskellDeclKeyword Keyword
164
- highlight def link HaskellDerive Keyword
169
+ highlight def link haskellDeriveKeyword Keyword
165
170
highlight def link haskellDecl Keyword
166
171
highlight def link haskellWhere Keyword
167
172
highlight def link haskellLet Keyword
168
173
else
169
174
highlight def link haskellDeclKeyword Structure
170
- highlight def link HaskellDerive Structure
175
+ highlight def link haskellDeriveKeyword Structure
171
176
highlight def link haskellDecl Structure
172
177
highlight def link haskellWhere Structure
173
178
highlight def link haskellLet Structure
0 commit comments