@@ -1,9 +1,9 @@
11<?xml version="1.0" encoding="UTF-8"?>
22<syntax name="haskell">
33 <meta>
4− <name>Haskell</name>
5− <type>compiled</type>
6− <preferred-file-extension>hs</preferred-file-extension>
4+ <name>Haskell</name>
5+ <type>compiled</type>
6+ <preferred-file-extension>hs</preferred-file-extension>
77 </meta>
88
99 <detectors>
@@ -57,8 +57,6 @@
5757 <include syntax="self" collection="type-family-definition" />
5858 <include syntax="self" collection="pattern-definition" />
5959 <include syntax="self" collection="type-definition" />
60− <!-- <include syntax="self" collection="type-annotation" /> -->
61− <include syntax="self" collection="data-definition" />
6260 <include syntax="self" collection="GADT-definition" />
6361 <include syntax="self" collection="instance" />
6462 <include syntax="self" collection="typeclass" />
@@ -67,7 +65,6 @@
6765
6866 <template-scopes>
6967 <include syntax="self" collection="Quote" />
70− <include syntax="self" collection="comments" />
7168 </template-scopes>
7269
7370 <collections>
@@ -80,51 +77,27 @@
8077 </collection>
8178
8279 <collection name="expressions">
83− <include syntax="self" collection="do-bind" />
80+ <scope name="haskell.construct.keyword.at">
81+ <expression>@</expression>
82+ </scope>
83+ <scope name="haskell.construct.keyword.case-arrow">
84+ <expression>-></expression>
85+ </scope>
86+ <scope name="haskell.construct.keyword.bind-arrow">
87+ <expression><-</expression>
88+ </scope>
89+ <include syntax="self" collection="keywords" />
8490 <include syntax="self" collection="literal" />
8591 <include syntax="self" collection="operators" />
92+ <include syntax="self" collection="record-match" />
8693 <include syntax="self" collection="list" />
94+ <include syntax="self" collection="view-pattern" />
8795 <include syntax="self" collection="lambda-case" />
8896 <include syntax="self" collection="lambda-head" />
89− <include syntax="self" collection="type-applications" />
90− <include syntax="self" collection="outer-case-expression" />
97+ <include syntax="self" collection="case-expression" />
98+ <include syntax="self" collection="qconid" />
9199 <include syntax="self" collection="qvarid" />
92100 <include syntax="self" collection="tuple" />
93−
94−
95− <!-- Needed for do binds -->
96− <!-- <include syntax="self" collection="pattern-match" /> -->
97− </collection>
98−
99− <collection name="pattern-match">
100− <include syntax="self" collection="literal" />
101− <include syntax="self" collection="tuple-match" />
102− <!-- <include syntax="self" collection="at-pattern" /> -->
103− <include syntax="self" collection="varid" />
104− <include syntax="self" collection="qconid" />
105− <include syntax="self" collection="record-match" />
106− <include syntax="self" collection="list-pattern" />
107− <include syntax="self" collection="view-pattern" />
108− </collection>
109−
110− <collection name="type-applications">
111− <scope name="type-applications">
112− <starts-with>
113− <expression>(\s@)\(</expression>
114− <capture number="1" name="haskell.keyword.operator.typeapplication" />
115− </starts-with>
116− <ends-with>
117− <expression>)</expression>
118− </ends-with>
119− <subscopes>
120− <include syntax="self" collection="type" />
121− </subscopes>
122− </scope>
123− <scope name="type-applications-single">
124− <expression>(@)(\w+)</expression>
125− <capture number="1" name="haskell.keyword.operator.typeapplication" />
126− <capture number="2" name="haskell.identifier.type" />
127− </scope>
128101 </collection>
129102
130103 <collection name="Quote">
@@ -163,8 +136,8 @@
163136 <capture number="1" name="haskell.pattern.record.bracket" />
164137 </ends-with>
165138 <subscopes>
166− <include syntax="self" collection="pattern-match" />
167− <include syntax="self" collection="varid" />
139+ <include syntax="self" collection="comments" />
140+ <include syntax="self" collection="expressions" />
168141 <scope name="record-sep">
169142 <expression>=</expression>
170143 </scope>
@@ -186,6 +159,7 @@
186159 <capture number="1" name="haskell.pattern.record.bracket" />
187160 </ends-with>
188161 <subscopes>
162+ <include syntax="self" collection="comments" />
189163 <scope name="haskell.pattern.record.wildcard">
190164 <expression>\.\.</expression>
191165 </scope>
@@ -212,29 +186,12 @@
212186 <capture number="1" name="haskell.list.bracket" />
213187 </ends-with>
214188 <subscopes>
189+ <include syntax="self" collection="comments" />
215190 <include syntax="self" collection="expressions" />
216191 </subscopes>
217192 </scope>
218193 </collection>
219194
220− <collection name="list-pattern">
221− <symbol type="expression" />
222− <scope name="haskell.pattern.list">
223− <starts-with>
224− <expression>(\[)</expression>
225− <capture number="1" name="haskell.pattern.list.bracket" />
226− </starts-with>
227− <ends-with>
228− <expression>(\])</expression>
229− <capture number="1" name="haskell.pattern.list.bracket" />
230− </ends-with>
231− <subscopes>
232− <include syntax="self" collection="pattern-match" />
233− </subscopes>
234− </scope>
235− </collection>
236−
237−
238195 <collection name="view-pattern">
239196 <scope name="haskell.pattern.view">
240197 <symbol type="expression" />
@@ -251,24 +208,7 @@
251208 <scope name="haskell.pattern.view.operator.arrow">
252209 <expression>-></expression>
253210 </scope>
254− <include syntax="self" collection="pattern-match" />
255− </subscopes>
256− </scope>
257− </collection>
258−
259− <collection name="tuple-match">
260− <symbol type="expression" />
261− <scope name="haskell.pattern.tuple">
262− <starts-with>
263− <expression>(\()</expression>
264− <capture number="1" name="haskell.pattern.tuple.bracket" />
265− </starts-with>
266− <ends-with>
267− <expression>(\))</expression>
268− <capture number="1" name="haskell.pattern.tuple.bracket" />
269− </ends-with>
270− <subscopes>
271− <include syntax="self" collection="pattern-match" />
211+ <include syntax="self" collection="expressions" />
272212 </subscopes>
273213 </scope>
274214 </collection>
@@ -284,53 +224,11 @@
284224 <capture number="1" name="haskell.case.keyword.condition" />
285225 </ends-with>
286226 <subscopes anchored="true">
287− <include syntax="self" collection="pattern-match" />
288− </subscopes>
289− </scope>
290− </collection>
291−
292− <collection name="case-match">
293− <scope name="case-match">
294− <starts-with>
295− <expression>(?=((\h*)\S.*->($|\h)))</expression>
296− </starts-with>
297− <ends-with>
298− <expression>-></expression>
299− </ends-with>
300− <subscopes anchored="true">
301− <include syntax="self" collection="pattern-match" />
302− </subscopes>
303− </scope>
304− </collection>
305−
306− <collection name="inner-case-expressions">
307− <scope name="inner-case-expressions">
308− <starts-with>
309− <expression>(?=((\h*)\S.*->($|\h)))</expression>
310− </starts-with>
311− <ends-with>
312− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
313− </ends-with>
314− <subscopes>
315− <include syntax="self" collection="case-match" />
316227 <include syntax="self" collection="expressions" />
317228 </subscopes>
318229 </scope>
319230 </collection>
320231
321− <collection name="outer-case-expression">
322− <scope name="outer-case-expression">
323− <starts-with>
324− <expression>(?=case)</expression>
325− </starts-with>
326− <ends-with />
327− <subscopes anchored="true" skip-whitespace="false">
328− <include syntax="self" collection="case-expression" />
329− <include syntax="self" collection="inner-case-expressions" repeat="true" />
330− </subscopes>
331− </scope>
332− </collection>
333−
334232 <collection name="tuple">
335233 <symbol type="expression" />
336234 <scope name="haskell.tuple">
@@ -343,60 +241,73 @@
343241 <capture number="1" name="haskell.tuple.bracket" />
344242 </ends-with>
345243 <subscopes>
244+ <include syntax="self" collection="comments" />
346245 <include syntax="self" collection="expressions" />
347246 </subscopes>
348247 </scope>
349248 </collection>
350249
351250 <collection name="typeclass">
352− <symbol type="interface" />
353− <scope name="haskell.definition.class">
251+ <scope name="haskell.definition.class.head">
252+ <symbol type="class" scope="global" name-selector="haskell.keyword.construct.class.name">
253+ <context behavior="whitespace" foldable="true" />
254+ </symbol>
354255 <starts-with>
355256 <expression>^(\h*)(class)($|\h)</expression>
356257 <capture number="2" name="haskell.keyword.construct.class" />
357258 </starts-with>
358− <ends-with>
359− <template>^(?!\s+\1\S)(?!\s*$)</template>
360− </ends-with>
361− <subscopes>
362− <scope name="haskell.keyword.construct.where">
259+ <ends-with />
260+ <subscopes anchored="true">
261+ <scope name="haskell.keyword.construct.class.name">
262+ <starts-with>
263+ <expression></expression>
264+ </starts-with>
265+ <ends-with>
266+ <expression>(?=(where|^\s*$))</expression>
267+ </ends-with>
268+ <subscopes>
269+ <include syntax="self" collection="comments" />
270+ <include syntax="self" collection="type" />
271+ </subscopes>
272+ </scope>
273+ <scope name="haskell.keyword.construct.where" optional="true">
363274 <expression>where</expression>
364275 </scope>
365− <include syntax="self" collection="type" />
366− <include syntax="self" collection="type-definition" />
367− <!-- <include syntax="self" collection="type-annotation" /> -->
368− <include syntax="self" collection="definition" />
369276 </subscopes>
370277 </scope>
371278 </collection>
372279
373280 <collection name="instance">
374281 <scope name="haskell.instance">
375− <symbol type="category" />
282+ <symbol type="category" name-selector="haskell.keyword.construct.instance.name">
283+ <context behavior="whitespace" foldable="true" />
284+ </symbol>
376285 <starts-with>
377286 <expression>^(\h*)(instance)($|\h)</expression>
378287 <capture number="2" name="haskell.keyword.construct.instance" />
379288 </starts-with>
380− <ends-with>
381− <template>^(?!\s+\1\S)(?!\s*$)</template>
382− </ends-with>
383− <subscopes>
384− <scope name="haskell.keyword.construct.where">
289+ <ends-with />
290+ <subscopes anchored="true">
291+ <scope name="haskell.keyword.construct.instance.name">
292+ <starts-with>
293+ <expression></expression>
294+ </starts-with>
295+ <ends-with>
296+ <expression>(?=(where|^\s*$))</expression>
297+ </ends-with>
298+ <subscopes>
299+ <include syntax="self" collection="type" />
300+ </subscopes>
301+ </scope>
302+ <scope name="haskell.keyword.construct.where" optional="true">
385303 <expression>where</expression>
386304 </scope>
387− <include syntax="self" collection="type" />
388− <include syntax="self" collection="type-definition" />
389− <include syntax="self" collection="type-annotation" />
390− <include syntax="self" collection="definition" />
391305 </subscopes>
392306 </scope>
393307 </collection>
394308
395309 <collection name="type-family-definition">
396310 <scope name="haskell.definition.type-family.type">
397− <symbol type="type">
398− <context behavior="subtree" foldable="false" />
399− </symbol>
400311 <starts-with>
401312 <expression>^(\h*)(type\h+family)</expression>
402313 <capture number="2" name="haskell.keyword.construct.type-family" />
@@ -434,10 +345,8 @@
434345 <ends-with>
435346 <template>^(?!\s+\1\S)(?!\s*$)</template>
436347 </ends-with>
437− <subscopes anchored="true">
438− <scope name="haskell.identifier.type-family.type.name">
439− <expression>\S+</expression>
440− </scope>
348+ <subscopes>
349+ <include syntax="self" collection="comments" />
441350 <include syntax="self" collection="type" optional="true" repeat="true" />
442351 <scope>
443352 <expression>=</expression>
@@ -450,65 +359,26 @@
450359 <collection name="definition">
451360 <scope name="haskell.definition.type.function">
452361 <symbol type="function">
453− <display-name>
454− <component selector="haskell.definition.type.function" />
455− </display-name>
456−
362+ <context behavior="whitespace" foldable="true" />
457363 </symbol>
458364 <starts-with>
459365 <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
460366 <capture number="2" name="haskell.keyword.construct.default" />
461− <capture number="3" name="haskell.identifier.function" />
367+ <capture number="3" name="haskell.identifier.function.name" />
462368 </starts-with>
463369 <ends-with>
464370 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
465371 </ends-with>
466372 <subscopes>
373+ <include syntax="self" collection="comments" />
467374 <include syntax="self" collection="type-annotation" />
468375 <include syntax="self" collection="implementation" />
469376 </subscopes>
470377 </scope>
471378 </collection>
472379
473− <collection name="do-bind">
474− <scope name="do-bind">
475− <starts-with>
476− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
477− </starts-with>
478− <ends-with>
479− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
480− </ends-with>
481− <subscopes>
482− <include syntax="self" collection="do-pattern" />
483− <include syntax="self" collection="expressions" />
484− <!-- <scope name="bind-arrow">
485− <expression><-</expression>
486− </scope> -->
487− </subscopes>
488− </scope>
489− </collection>
490−
491− <collection name="do-pattern">
492− <scope name="do-pattern">
493− <starts-with>
494− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
495− </starts-with>
496− <ends-with>
497− <expression><-</expression>
498− </ends-with>
499− <subscopes>
500− <include syntax="self" collection="pattern-match" />
501− <!-- <scope name="bind-arrow">
502− <expression><-</expression>
503− </scope>
504− <include syntax="self" collection="expressions" repeat="true" /> -->
505− </subscopes>
506− </scope>
507− </collection>
508−
509380 <collection name="implementation">
510− <scope name="haskell.definition.type.function">
511− <local scope="within-construct" />
381+ <scope name="haskell.definition.type.function.implementation">
512382 <starts-with>
513383 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
514384 <capture number="2" name="haskell.keyword.construct.default" />
@@ -518,14 +388,20 @@
518388 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
519389 </ends-with>
520390 <subscopes>
521− <include syntax="self" collection="where-clause" />
522− <include syntax="self" collection="expressions" />
391+ <include syntax="self" collection="comments" />
392+ <include syntax="self" collection="pattern-match" optional="true" repeat="true" />
393+ <scope>
394+ <expression>=</expression>
395+ <capture number="0" name="haskell.construct.function.keyword.eq" />
396+ </scope>
397+ <include syntax="self" collection="expressions" optional="true" repeat="true" />
398+ <include syntax="self" collection="where-clause" optional="true" />
523399 </subscopes>
524400 </scope>
525401 </collection>
526402
527403 <collection name="type-annotation">
528− <scope name="haskell.definition.type.function">
404+ <scope name="haskell.definition.type.function.type-signature">
529405 <starts-with>
530406 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
531407 <capture number="2" name="haskell.identifier.function" />
@@ -534,6 +410,7 @@
534410 <template>^(?!\s+\1\S)(?!\s*$)</template>
535411 </ends-with>
536412 <subscopes>
413+ <include syntax="self" collection="comments" />
537414 <include syntax="self" collection="type" />
538415 </subscopes>
539416 </scope>
@@ -541,15 +418,19 @@
541418
542419 <collection name="type-definition">
543420 <scope name="haskell.definition.type">
421+ <symbol type="type" scope="global">
422+ <context behavior="whitespace" foldable="true" />
423+ </symbol>
544424 <starts-with>
545425 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
546426 <capture number="2" name="haskell.keyword.construct.type" />
547− <capture number="3" name="haskell.identifier.type" />
427+ <capture number="3" name="haskell.identifier.type.name" />
548428 </starts-with>
549429 <ends-with>
550430 <template>^(?!\s+\1\S)(?!\s*$)</template>
551431 </ends-with>
552432 <subscopes>
433+ <include syntax="self" collection="comments" />
553434 <include syntax="self" collection="type" />
554435 </subscopes>
555436 </scope>
@@ -557,66 +438,72 @@
557438
558439 <collection name="GADT-definition">
559440 <scope name="haskell.definition.struct.GADT">
441+ <symbol type="struct" scope="global">
442+ <context behavior="subtree" foldable="false" />
443+ </symbol>
560444 <starts-with>
561− <expression>^(\h*)(data)\h+(\w(\w|')*)</expression>
445+ <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
562446 <capture number="2" name="haskell.keyword.construct.data.GADT" />
447+ <capture number="3" name="haskell.identifier.data.type.name" />
563448 </starts-with>
564449 <ends-with>
565450 <template>^(?!\s+\1\S)(?!\s*$)</template>
566451 </ends-with>
567452 <subscopes>
453+ <include syntax="self" collection="comments" />
454+ <scope name="haskell.keyword.construct.where">
455+ <expression>where</expression>
456+ </scope>
457+
458+ <include syntax="self" collection="deriving-clause" />
459+ <include syntax="self" collection="record-definition" />
568460 <include syntax="self" collection="gadt-constructor" />
569461 <include syntax="self" collection="type" />
570− <include syntax="self" collection="record-definition" />
571− <include syntax="self" collection="record-definition-field-name" />
572462 </subscopes>
573463 </scope>
574464 </collection>
575465
576466 <collection name="gadt-constructor">
577− <scope name="identifier.type.struct.GADT.constructor">
578− <expression>^\h+[A-Z](\w|')*</expression>
579− </scope>
580− </collection>
581−
582− <collection name="data-definition">
583− <scope name="haskell.definition.struct.data">
467+ <scope name="haskell.identifier.type.struct.data.constructor">
468+ <symbol type="constructor">
469+ <context behavior="subtree" foldable="true" />
470+ </symbol>
584471 <starts-with>
585− <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
586− <capture number="2" name="haskell.keyword.construct.data.newtype" />
587− <capture number="3" name="haskell.identifier.type" />
472+ <expression>(^|=|\||^)\h+([A-Z](\w|')*)</expression>
473+ <capture number="2" name="haskell.identifier.data.name" />
588474 </starts-with>
589− <ends-with>
590− <template>^(?!\s+\1\S)(?!\s*$)</template>
591− </ends-with>
592− <subscopes>
475+ <ends-with />
476+ <subscopes anchored="true">
593477 <include syntax="self" collection="record-definition" />
594− <include syntax="self" collection="data-constructor" />
595− <include syntax="self" collection="type" />
596478 </subscopes>
597479 </scope>
598480 </collection>
599481
600− <collection name="data-constructor">
601− <scope name="haskell.identifier.type.struct.data.constructor">
602− <expression>=\h+[A-Z](\w|')*</expression>
482+ <collection name="deriving-clause">
483+ <scope name="haskell.record.construct.deriving.keyword">
484+ <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
603485 </scope>
604− <scope name="haskell.identifier.type.struct.data.constructor">
605− <expression>\|\h+[A-Z](\w|')*</expression>
486+ <scope name="haskell.record.construct.deriving.keyword">
487+ <include syntax="self" collection="comments" />
488+ <expression>via</expression>
606489 </scope>
607490 </collection>
608491
609492 <collection name="record-definition">
610493 <scope name="haskell.record">
494+ <symbol>
495+ <context behavior="subtree" foldable="true" />
496+ </symbol>
611497 <starts-with>
612− <expression>(\{)</expression>
613− <capture number="1" name="haskell.record.bracket" />
498+ <expression>(?=\{)</expression>
499+ <capture number="0" name="haskell.record.bracket" />
614500 </starts-with>
615501 <ends-with>
616502 <expression>(\})</expression>
617503 <capture number="1" name="haskell.record.bracket" />
618504 </ends-with>
619505 <subscopes>
506+ <include syntax="self" collection="comments" />
620507 <include syntax="self" collection="record-definition-field-name" />
621508 <include syntax="self" collection="type" />
622509 </subscopes>
@@ -625,11 +512,21 @@
625512
626513 <collection name="record-definition-field-name">
627514 <scope name="haskell.record.definition.property">
628− <expression>\w(\w|')*\h*::</expression>
515+ <symbol type="property" />
516+ <expression>(((?![A-Z])\w(\w|')*)\h*::|(^|\{|,)\h*((?![A-Z])\w(\w|')*))</expression>
517+ <capture number="5" name="haskell.record.definition.property.field.property.name" />
518+ <capture number="2" name="haskell.record.definition.property.field.property.name" />
629519 </scope>
630520 </collection>
631521
632522 <collection name="type">
523+ <scope name="haskell.keyword.construct.function-arrow">
524+ <expression>-></expression>
525+ </scope>
526+ <scope name="haskell.keyword.construct.fat-arrow">
527+ <expression>=></expression>
528+ </scope>
529+ <include syntax="self" collection="strings" />
633530 <scope name="haskell.type.construct.tuple">
634531 <starts-with>
635532 <expression>\(</expression>
@@ -638,6 +535,7 @@
638535 <expression>\)</expression>
639536 </ends-with>
640537 <subscopes>
538+ <include syntax="self" collection="comments" />
641539 <scope name="haskell.construct.type.typle.comma">
642540 <expression>\,</expression>
643541 </scope>
@@ -652,6 +550,7 @@
652550 <expression>\]</expression>
653551 </ends-with>
654552 <subscopes>
553+ <include syntax="self" collection="comments" />
655554 <include syntax="self" collection="type" />
656555 </subscopes>
657556 </scope>
@@ -663,7 +562,7 @@
663562 </scope>
664563 <include syntax="self" collection="type-list" />
665564 <scope>
666− <expression>(([A-Z](\w|')*\.)*)'*([A-Z](\w|')*)</expression>
565+ <expression>(([A-Z](\w|')*\.)*)'*\!?([A-Z](\w|')*)</expression>
667566 <capture number="1" name="haskell.identifier.package.module" />
668567 <capture number="4" name="haskell.identifier.type" />
669568 </scope>
@@ -671,13 +570,7 @@
671570 <expression>forall</expression>
672571 </scope>
673572 <scope name="haskell.identifier.type.variable">
674− <expression>(?!=)((?!(\(|\)|\,))\S)((?!(\(|\)|\,))\S)*</expression>
675− </scope>
676− <scope name="haskell.keyword.construct.function-arrow">
677− <expression>-></expression>
678− </scope>
679− <scope name="haskell.keyword.construct.fat-arrow">
680− <expression>=></expression>
573+ <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\w)*</expression>
681574 </scope>
682575 </collection>
683576
@@ -692,6 +585,7 @@
692585 <template>^(?!\s+\1\S)(?!\s*$)</template>
693586 </ends-with>
694587 <subscopes>
588+ <include syntax="self" collection="comments" />
695589 <scope name="haskell.keyword.construct.where">
696590 <expression>where</expression>
697591 </scope>
@@ -711,6 +605,7 @@
711605 <capture number="1" name="haskell.type-list.bracket" />
712606 </ends-with>
713607 <subscopes>
608+ <include syntax="self" collection="comments" />
714609 <include syntax="self" collection="type" />
715610 </subscopes>
716611 </scope>
@@ -727,6 +622,7 @@
727622 <capture number="1" name="haskell.keyword.construct.lambda" />
728623 </ends-with>
729624 <subscopes>
625+ <include syntax="self" collection="comments" />
730626 <include syntax="self" collection="pattern-match" />
731627 </subscopes>
732628 </scope>
@@ -740,7 +636,6 @@
740636
741637 <collection name="where-clause">
742638 <scope name="haskell.construct.where">
743− <local scope="within-parent" />
744639 <starts-with>
745640 <expression>^(\h*)(where)</expression>
746641 <capture number="2" name="haskell.construct.keyword.where" />
@@ -749,6 +644,7 @@
749644 <template>^(?!\1\s*\S)(?!s*$)</template>
750645 </ends-with>
751646 <subscopes>
647+ <include syntax="self" collection="comments" />
752648 <include syntax="self" collection="definition" />
753649 </subscopes>
754650 </scope>
@@ -788,12 +684,12 @@
788684
789685
790686 <collection name="strings">
791− <scope name="haskell.string.double-quoted">
687+ <scope name="haskell.string.double-quoted" spell-check="true">
792688 <starts-with>
793− <expression>"</expression>
689+ <expression>"</expression>
794690 </starts-with>
795691 <ends-with>
796− <expression>"</expression>
692+ <expression>"</expression>
797693 </ends-with>
798694 <subscopes>
799695 <scope name="haskell.string.escape-sequences">
@@ -830,6 +726,7 @@
830726 </ends-with>
831727 <subscopes>
832728 <scope name="identifier.haskell.type">
729+ <symbol type="expression" />
833730 <symbol type="expression" />
834731 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
835732 <capture number="1" name="identifier.type" />
@@ -854,6 +751,7 @@
854751 </ends-with>
855752 <subscopes>
856753 <scope name="haskell.construct.qualified">
754+ <symbol type="expression" />
857755 <expression>qualified</expression>
858756 <capture number="0" name="haskell.construct.keyword.qualified" />
859757 </scope>
@@ -871,6 +769,7 @@
871769 </ends-with>
872770 <subscopes anchored="true">
873771 <include syntax="self" collection="import-list" />
772+ <symbol type="expression" />
874773 </subscopes>
875774 </scope>
876775
@@ -904,6 +803,7 @@
904803 </ends-with>
905804 <subscopes>
906805 <scope name="haskell.identifier.struct">
806+ <symbol type="expression" />
907807 <symbol type="reference" scope="local" />
908808 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
909809 <capture number="1" name="haskell.import-list.identifier.type.name" />
@@ -917,13 +817,6 @@
917817 </scope>
918818 </collection>
919819
920− <!-- <collection name="special">
921− <scope>
922− <expression>(;|,)</expression>
923− </scope>
924− </collection> -->
925−
926−
927820 <collection name="reservedop">
928821 <scope name="keyword.operator">
929822 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
@@ -931,10 +824,11 @@
931824 </collection>
932825
933826 <collection name="keywords">
934− <scope name="haskell.keyword.modifier">
827+ <scope name="haskell.keyword.self">
935828 <symbol type="keyword" />
936829 <strings>
937830 <string>do</string>
831+ <string>mdo</string>
938832 <string>in</string>
939833 <string>infix</string>
940834 <string>infixl</string>
@@ -972,20 +866,18 @@
972866 <strings>
973867 <string>undefined</string>
974868 <string>_</string>
869+ <string>@</string>
975870 </strings>
976871 </scope>
977872 </collection>
978873
979874 <collection name="comments">
980875 <scope name="haskell.comment.single" spell-check="true">
981− <starts-with>
982− <expression>--</expression>
983− </starts-with>
984− <ends-with>
985− <expression>$</expression>
986− </ends-with>
876+ <symbol type="comment" />
877+ <expression> --.*$</expression>
987878 </scope>
988879 <scope name="haskell.comment.block" spell-check="true">
880+ <symbol type="comment" />
989881 <starts-with>
990882 <expression>{-</expression>
991883 </starts-with>
@@ -997,4 +889,4 @@
997889
998890
999891 </collections>
1000−</syntax>
892+</syntax>