@@ -1,9 +1,9 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2<syntax name="haskell">
2<syntax name="haskell">
4− <name>Haskell</name>
4+ <name>Haskell</name>
5− <type>compiled</type>
5+ <type>compiled</type>
6− <preferred-file-extension>hs</preferred-file-extension>
6+ <preferred-file-extension>hs</preferred-file-extension>
9 <detectors>
9 <detectors>
@@ -57,6 +57,7 @@
57 <include syntax="self" collection="type-family-definition" />
57 <include syntax="self" collection="type-family-definition" />
58 <include syntax="self" collection="pattern-definition" />
58 <include syntax="self" collection="pattern-definition" />
59 <include syntax="self" collection="type-definition" />
59 <include syntax="self" collection="type-definition" />
60+ <!-- <include syntax="self" collection="type-annotation" /> -->
60 <include syntax="self" collection="GADT-definition" />
61 <include syntax="self" collection="GADT-definition" />
61 <include syntax="self" collection="instance" />
62 <include syntax="self" collection="instance" />
62 <include syntax="self" collection="typeclass" />
63 <include syntax="self" collection="typeclass" />
@@ -65,6 +66,7 @@
66 <template-scopes>
67 <template-scopes>
67 <include syntax="self" collection="Quote" />
68 <include syntax="self" collection="Quote" />
69+ <include syntax="self" collection="comments" />
68 </template-scopes>
70 </template-scopes>
70 <collections>
72 <collections>
@@ -77,27 +79,51 @@
77 </collection>
79 </collection>
79 <collection name="expressions">
81 <collection name="expressions">
80− <scope name="haskell.construct.keyword.at">
81− <expression>@</expression>
83− <scope name="haskell.construct.keyword.case-arrow">
84− <expression>-></expression>
86− <scope name="haskell.construct.keyword.bind-arrow">
87− <expression><-</expression>
89− <include syntax="self" collection="keywords" />
82+ <include syntax="self" collection="do-bind" />
90 <include syntax="self" collection="literal" />
83 <include syntax="self" collection="literal" />
91 <include syntax="self" collection="operators" />
84 <include syntax="self" collection="operators" />
92− <include syntax="self" collection="record-match" />
93 <include syntax="self" collection="list" />
85 <include syntax="self" collection="list" />
94− <include syntax="self" collection="view-pattern" />
95 <include syntax="self" collection="lambda-case" />
86 <include syntax="self" collection="lambda-case" />
96 <include syntax="self" collection="lambda-head" />
87 <include syntax="self" collection="lambda-head" />
97− <include syntax="self" collection="case-expression" />
88+ <include syntax="self" collection="type-applications" />
98− <include syntax="self" collection="qconid" />
89+ <include syntax="self" collection="outer-case-expression" />
99 <include syntax="self" collection="qvarid" />
90 <include syntax="self" collection="qvarid" />
100 <include syntax="self" collection="tuple" />
91 <include syntax="self" collection="tuple" />
94+ <!-- Needed for do binds -->
95+ <!-- <include syntax="self" collection="pattern-match" /> -->
98+ <collection name="pattern-match">
99+ <include syntax="self" collection="literal" />
100+ <include syntax="self" collection="tuple-match" />
101+ <!-- <include syntax="self" collection="at-pattern" /> -->
102+ <include syntax="self" collection="varid" />
103+ <include syntax="self" collection="qconid" />
104+ <include syntax="self" collection="record-match" />
105+ <include syntax="self" collection="list-pattern" />
106+ <include syntax="self" collection="view-pattern" />
109+ <collection name="type-applications">
110+ <scope name="type-applications">
112+ <expression>(\s@)\(</expression>
113+ <capture number="1" name="haskell.keyword.operator.typeapplication" />
116+ <expression>)</expression>
119+ <include syntax="self" collection="type" />
122+ <scope name="type-applications-single">
123+ <expression>(@)(\w+)</expression>
124+ <capture number="1" name="haskell.keyword.operator.typeapplication" />
125+ <capture number="2" name="haskell.identifier.type" />
101 </collection>
127 </collection>
103 <collection name="Quote">
129 <collection name="Quote">
@@ -136,8 +162,8 @@
136 <capture number="1" name="haskell.pattern.record.bracket" />
162 <capture number="1" name="haskell.pattern.record.bracket" />
137 </ends-with>
163 </ends-with>
138 <subscopes>
164 <subscopes>
139− <include syntax="self" collection="comments" />
165+ <include syntax="self" collection="pattern-match" />
140− <include syntax="self" collection="expressions" />
166+ <include syntax="self" collection="varid" />
141 <scope name="record-sep">
167 <scope name="record-sep">
142 <expression>=</expression>
168 <expression>=</expression>
@@ -159,7 +185,6 @@
159 <capture number="1" name="haskell.pattern.record.bracket" />
185 <capture number="1" name="haskell.pattern.record.bracket" />
160 </ends-with>
186 </ends-with>
161 <subscopes>
187 <subscopes>
162− <include syntax="self" collection="comments" />
163 <scope name="haskell.pattern.record.wildcard">
188 <scope name="haskell.pattern.record.wildcard">
164 <expression>\.\.</expression>
189 <expression>\.\.</expression>
@@ -186,12 +211,29 @@
186 <capture number="1" name="haskell.list.bracket" />
211 <capture number="1" name="haskell.list.bracket" />
187 </ends-with>
212 </ends-with>
188 <subscopes>
213 <subscopes>
189− <include syntax="self" collection="comments" />
190 <include syntax="self" collection="expressions" />
214 <include syntax="self" collection="expressions" />
191 </subscopes>
215 </subscopes>
193 </collection>
217 </collection>
219+ <collection name="list-pattern">
220+ <symbol type="expression" />
221+ <scope name="haskell.pattern.list">
223+ <expression>(\[)</expression>
224+ <capture number="1" name="haskell.pattern.list.bracket" />
227+ <expression>(\])</expression>
228+ <capture number="1" name="haskell.pattern.list.bracket" />
231+ <include syntax="self" collection="pattern-match" />
195 <collection name="view-pattern">
237 <collection name="view-pattern">
196 <scope name="haskell.pattern.view">
238 <scope name="haskell.pattern.view">
197 <symbol type="expression" />
239 <symbol type="expression" />
@@ -208,7 +250,24 @@
208 <scope name="haskell.pattern.view.operator.arrow">
250 <scope name="haskell.pattern.view.operator.arrow">
209 <expression>-></expression>
251 <expression>-></expression>
211− <include syntax="self" collection="expressions" />
253+ <include syntax="self" collection="pattern-match" />
258+ <collection name="tuple-match">
259+ <symbol type="expression" />
260+ <scope name="haskell.pattern.tuple">
262+ <expression>(\()</expression>
263+ <capture number="1" name="haskell.pattern.tuple.bracket" />
266+ <expression>(\))</expression>
267+ <capture number="1" name="haskell.pattern.tuple.bracket" />
270+ <include syntax="self" collection="pattern-match" />
212 </subscopes>
271 </subscopes>
214 </collection>
273 </collection>
@@ -224,11 +283,53 @@
224 <capture number="1" name="haskell.case.keyword.condition" />
283 <capture number="1" name="haskell.case.keyword.condition" />
225 </ends-with>
284 </ends-with>
226 <subscopes anchored="true">
285 <subscopes anchored="true">
286+ <include syntax="self" collection="pattern-match" />
291+ <collection name="case-match">
292+ <scope name="case-match">
294+ <expression>(?=((\h*)\S.*->($|\h)))</expression>
297+ <expression>-></expression>
299+ <subscopes anchored="true">
300+ <include syntax="self" collection="pattern-match" />
305+ <collection name="inner-case-expressions">
306+ <scope name="inner-case-expressions">
308+ <expression>(?=((\h*)\S.*->($|\h)))</expression>
311+ <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
314+ <include syntax="self" collection="case-match" />
227 <include syntax="self" collection="expressions" />
315 <include syntax="self" collection="expressions" />
228 </subscopes>
316 </subscopes>
230 </collection>
318 </collection>
320+ <collection name="outer-case-expression">
321+ <scope name="outer-case-expression">
323+ <expression>(?=case)</expression>
326+ <subscopes anchored="true" skip-whitespace="false">
327+ <include syntax="self" collection="case-expression" />
328+ <include syntax="self" collection="inner-case-expressions" repeat="true" />
232 <collection name="tuple">
333 <collection name="tuple">
233 <symbol type="expression" />
334 <symbol type="expression" />
234 <scope name="haskell.tuple">
335 <scope name="haskell.tuple">
@@ -241,73 +342,60 @@
241 <capture number="1" name="haskell.tuple.bracket" />
342 <capture number="1" name="haskell.tuple.bracket" />
242 </ends-with>
343 </ends-with>
243 <subscopes>
344 <subscopes>
244− <include syntax="self" collection="comments" />
245 <include syntax="self" collection="expressions" />
345 <include syntax="self" collection="expressions" />
246 </subscopes>
346 </subscopes>
248 </collection>
348 </collection>
250 <collection name="typeclass">
350 <collection name="typeclass">
251− <scope name="haskell.definition.class.head">
351+ <symbol type="interface" />
252− <symbol type="class" scope="global" name-selector="haskell.keyword.construct.class.name">
352+ <scope name="haskell.definition.class">
253− <context behavior="whitespace" foldable="true" />
255 <starts-with>
353 <starts-with>
256 <expression>^(\h*)(class)($|\h)</expression>
354 <expression>^(\h*)(class)($|\h)</expression>
257 <capture number="2" name="haskell.keyword.construct.class" />
355 <capture number="2" name="haskell.keyword.construct.class" />
258 </starts-with>
356 </starts-with>
259− <ends-with />
357+ <ends-with>
260− <subscopes anchored="true">
358+ <template>^(?!\s+\1\S)(?!\s*$)</template>
261− <scope name="haskell.keyword.construct.class.name">
263− <expression></expression>
266− <expression>(?=(where|^\s*$))</expression>
267− </ends-with>
359+ </ends-with>
268− <subscopes>
360+ <subscopes>
269− <include syntax="self" collection="comments" />
270− <include syntax="self" collection="type" />
273− <scope name="haskell.keyword.construct.where" optional="true">
361+ <scope name="haskell.keyword.construct.where">
274 <expression>where</expression>
362 <expression>where</expression>
364+ <include syntax="self" collection="type" />
365+ <include syntax="self" collection="type-definition" />
366+ <!-- <include syntax="self" collection="type-annotation" /> -->
367+ <include syntax="self" collection="definition" />
276 </subscopes>
368 </subscopes>
278 </collection>
370 </collection>
280 <collection name="instance">
372 <collection name="instance">
281 <scope name="haskell.instance">
373 <scope name="haskell.instance">
282− <symbol type="category" name-selector="haskell.keyword.construct.instance.name">
374+ <symbol type="category" />
283− <context behavior="whitespace" foldable="true" />
285 <starts-with>
375 <starts-with>
286 <expression>^(\h*)(instance)($|\h)</expression>
376 <expression>^(\h*)(instance)($|\h)</expression>
287 <capture number="2" name="haskell.keyword.construct.instance" />
377 <capture number="2" name="haskell.keyword.construct.instance" />
288 </starts-with>
378 </starts-with>
289− <ends-with />
379+ <ends-with>
290− <subscopes anchored="true">
380+ <template>^(?!\s+\1\S)(?!\s*$)</template>
291− <scope name="haskell.keyword.construct.instance.name">
293− <expression></expression>
296− <expression>(?=(where|^\s*$))</expression>
297− </ends-with>
381+ </ends-with>
298− <subscopes>
382+ <subscopes>
299− <include syntax="self" collection="type" />
302− <scope name="haskell.keyword.construct.where" optional="true">
383+ <scope name="haskell.keyword.construct.where">
303 <expression>where</expression>
384 <expression>where</expression>
386+ <include syntax="self" collection="type" />
387+ <include syntax="self" collection="type-definition" />
388+ <include syntax="self" collection="type-annotation" />
389+ <include syntax="self" collection="definition" />
305 </subscopes>
390 </subscopes>
307 </collection>
392 </collection>
309 <collection name="type-family-definition">
394 <collection name="type-family-definition">
310 <scope name="haskell.definition.type-family.type">
395 <scope name="haskell.definition.type-family.type">
396+ <symbol type="type">
397+ <context behavior="subtree" foldable="false" />
311 <starts-with>
399 <starts-with>
312 <expression>^(\h*)(type\h+family)</expression>
400 <expression>^(\h*)(type\h+family)</expression>
313 <capture number="2" name="haskell.keyword.construct.type-family" />
401 <capture number="2" name="haskell.keyword.construct.type-family" />
@@ -346,7 +434,6 @@
346 <template>^(?!\s+\1\S)(?!\s*$)</template>
434 <template>^(?!\s+\1\S)(?!\s*$)</template>
347 </ends-with>
435 </ends-with>
348 <subscopes>
436 <subscopes>
349− <include syntax="self" collection="comments" />
350 <include syntax="self" collection="type" optional="true" repeat="true" />
437 <include syntax="self" collection="type" optional="true" repeat="true" />
352 <expression>=</expression>
439 <expression>=</expression>
@@ -359,26 +446,65 @@
359 <collection name="definition">
446 <collection name="definition">
360 <scope name="haskell.definition.type.function">
447 <scope name="haskell.definition.type.function">
361 <symbol type="function">
448 <symbol type="function">
362− <context behavior="whitespace" foldable="true" />
449+ <display-name>
450+ <component selector="haskell.definition.type.function" />
363 </symbol>
453 </symbol>
364 <starts-with>
454 <starts-with>
365 <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
455 <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
366 <capture number="2" name="haskell.keyword.construct.default" />
456 <capture number="2" name="haskell.keyword.construct.default" />
367− <capture number="3" name="haskell.identifier.function.name" />
457+ <capture number="3" name="haskell.identifier.function" />
368 </starts-with>
458 </starts-with>
369 <ends-with>
459 <ends-with>
370 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
460 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
371 </ends-with>
461 </ends-with>
372 <subscopes>
462 <subscopes>
373− <include syntax="self" collection="comments" />
374 <include syntax="self" collection="type-annotation" />
463 <include syntax="self" collection="type-annotation" />
375 <include syntax="self" collection="implementation" />
464 <include syntax="self" collection="implementation" />
376 </subscopes>
465 </subscopes>
378 </collection>
467 </collection>
469+ <collection name="do-bind">
470+ <scope name="do-bind">
472+ <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
475+ <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
478+ <include syntax="self" collection="do-pattern" />
479+ <include syntax="self" collection="expressions" />
480+ <!-- <scope name="bind-arrow">
481+ <expression><-</expression>
487+ <collection name="do-pattern">
488+ <scope name="do-pattern">
490+ <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
493+ <expression><-</expression>
496+ <include syntax="self" collection="pattern-match" />
497+ <!-- <scope name="bind-arrow">
498+ <expression><-</expression>
500+ <include syntax="self" collection="expressions" repeat="true" /> -->
380 <collection name="implementation">
505 <collection name="implementation">
381− <scope name="haskell.definition.type.function.implementation">
506+ <scope name="haskell.definition.type.function">
507+ <local scope="within-construct" />
382 <starts-with>
508 <starts-with>
383 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
509 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
384 <capture number="2" name="haskell.keyword.construct.default" />
510 <capture number="2" name="haskell.keyword.construct.default" />
@@ -388,20 +514,14 @@
388 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
514 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
389 </ends-with>
515 </ends-with>
390 <subscopes>
516 <subscopes>
391− <include syntax="self" collection="comments" />
517+ <include syntax="self" collection="where-clause" />
392− <include syntax="self" collection="pattern-match" optional="true" repeat="true" />
518+ <include syntax="self" collection="expressions" />
394− <expression>=</expression>
395− <capture number="0" name="haskell.construct.function.keyword.eq" />
397− <include syntax="self" collection="expressions" optional="true" repeat="true" />
398− <include syntax="self" collection="where-clause" optional="true" />
399 </subscopes>
519 </subscopes>
401 </collection>
521 </collection>
403 <collection name="type-annotation">
523 <collection name="type-annotation">
404− <scope name="haskell.definition.type.function.type-signature">
524+ <scope name="haskell.definition.type.function">
405 <starts-with>
525 <starts-with>
406 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
526 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
407 <capture number="2" name="haskell.identifier.function" />
527 <capture number="2" name="haskell.identifier.function" />
@@ -410,7 +530,6 @@
410 <template>^(?!\s+\1\S)(?!\s*$)</template>
530 <template>^(?!\s+\1\S)(?!\s*$)</template>
411 </ends-with>
531 </ends-with>
412 <subscopes>
532 <subscopes>
413− <include syntax="self" collection="comments" />
414 <include syntax="self" collection="type" />
533 <include syntax="self" collection="type" />
415 </subscopes>
534 </subscopes>
@@ -418,19 +537,15 @@
419 <collection name="type-definition">
538 <collection name="type-definition">
420 <scope name="haskell.definition.type">
539 <scope name="haskell.definition.type">
421− <symbol type="type" scope="global">
422− <context behavior="whitespace" foldable="true" />
424 <starts-with>
540 <starts-with>
425 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
541 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
426 <capture number="2" name="haskell.keyword.construct.type" />
542 <capture number="2" name="haskell.keyword.construct.type" />
427− <capture number="3" name="haskell.identifier.type.name" />
543+ <capture number="3" name="haskell.identifier.type" />
428 </starts-with>
544 </starts-with>
429 <ends-with>
545 <ends-with>
430 <template>^(?!\s+\1\S)(?!\s*$)</template>
546 <template>^(?!\s+\1\S)(?!\s*$)</template>
431 </ends-with>
547 </ends-with>
432 <subscopes>
548 <subscopes>
433− <include syntax="self" collection="comments" />
434 <include syntax="self" collection="type" />
549 <include syntax="self" collection="type" />
435 </subscopes>
550 </subscopes>
@@ -438,7 +553,7 @@
439 <collection name="GADT-definition">
554 <collection name="GADT-definition">
440 <scope name="haskell.definition.struct.GADT">
555 <scope name="haskell.definition.struct.GADT">
441− <symbol type="struct" scope="global">
556+ <symbol type="struct">
442 <context behavior="subtree" foldable="false" />
557 <context behavior="subtree" foldable="false" />
443 </symbol>
558 </symbol>
444 <starts-with>
559 <starts-with>
@@ -450,7 +565,6 @@
450 <template>^(?!\s+\1\S)(?!\s*$)</template>
565 <template>^(?!\s+\1\S)(?!\s*$)</template>
451 </ends-with>
566 </ends-with>
452 <subscopes>
567 <subscopes>
453− <include syntax="self" collection="comments" />
454 <scope name="haskell.keyword.construct.where">
568 <scope name="haskell.keyword.construct.where">
455 <expression>where</expression>
569 <expression>where</expression>
@@ -466,26 +580,21 @@
466 <collection name="gadt-constructor">
580 <collection name="gadt-constructor">
467 <scope name="haskell.identifier.type.struct.data.constructor">
581 <scope name="haskell.identifier.type.struct.data.constructor">
468 <symbol type="constructor">
582 <symbol type="constructor">
469− <context behavior="subtree" foldable="true" />
583+ <context behavior="whitespace" />
470 </symbol>
584 </symbol>
472− <expression>(^|=|\||^)\h+([A-Z](\w|')*)</expression>
585+ <expression>(^|=|\|)\h+([A-Z](\w|')*)</expression>
473− <capture number="2" name="haskell.identifier.data.name" />
586+ <capture number="2" name="haskell.identifier.data.name" />
474− </starts-with>
587+ </scope>
475− <ends-with />
588+ <scope name="identifier.type.struct.GADT.constructor">
476− <subscopes anchored="true">
589+ <symbol type="constructor"></symbol>
477− <include syntax="self" collection="record-definition" />
590+ <expression>^\h+([A-Z](\w|')*)</expression>
478− </subscopes>
591+ <capture number="1" name="haskell.identifier.data.name" />
480 </collection>
593 </collection>
482 <collection name="deriving-clause">
595 <collection name="deriving-clause">
483 <scope name="haskell.record.construct.deriving.keyword">
596 <scope name="haskell.record.construct.deriving.keyword">
484− <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
597+ <expression>deriving\h+(newtype|stock|anyclass)</expression>
486− <scope name="haskell.record.construct.deriving.keyword">
487− <include syntax="self" collection="comments" />
488− <expression>via</expression>
490 </collection>
599 </collection>
@@ -503,7 +612,6 @@
503 <capture number="1" name="haskell.record.bracket" />
612 <capture number="1" name="haskell.record.bracket" />
504 </ends-with>
613 </ends-with>
505 <subscopes>
614 <subscopes>
506− <include syntax="self" collection="comments" />
507 <include syntax="self" collection="record-definition-field-name" />
615 <include syntax="self" collection="record-definition-field-name" />
508 <include syntax="self" collection="type" />
616 <include syntax="self" collection="type" />
509 </subscopes>
617 </subscopes>
@@ -520,13 +628,6 @@
520 </collection>
628 </collection>
522 <collection name="type">
630 <collection name="type">
523− <scope name="haskell.keyword.construct.function-arrow">
524− <expression>-></expression>
526− <scope name="haskell.keyword.construct.fat-arrow">
527− <expression>=></expression>
529− <include syntax="self" collection="strings" />
530 <scope name="haskell.type.construct.tuple">
631 <scope name="haskell.type.construct.tuple">
531 <starts-with>
632 <starts-with>
532 <expression>\(</expression>
633 <expression>\(</expression>
@@ -535,7 +636,6 @@
535 <expression>\)</expression>
636 <expression>\)</expression>
536 </ends-with>
637 </ends-with>
537 <subscopes>
638 <subscopes>
538− <include syntax="self" collection="comments" />
539 <scope name="haskell.construct.type.typle.comma">
639 <scope name="haskell.construct.type.typle.comma">
540 <expression>\,</expression>
640 <expression>\,</expression>
@@ -550,7 +650,6 @@
550 <expression>\]</expression>
650 <expression>\]</expression>
551 </ends-with>
651 </ends-with>
552 <subscopes>
652 <subscopes>
553− <include syntax="self" collection="comments" />
554 <include syntax="self" collection="type" />
653 <include syntax="self" collection="type" />
555 </subscopes>
654 </subscopes>
@@ -562,7 +661,7 @@
563 <include syntax="self" collection="type-list" />
662 <include syntax="self" collection="type-list" />
565− <expression>(([A-Z](\w|')*\.)*)'*\!?([A-Z](\w|')*)</expression>
664+ <expression>(([A-Z](\w|')*\.)*)'*([A-Z](\w|')*)</expression>
566 <capture number="1" name="haskell.identifier.package.module" />
665 <capture number="1" name="haskell.identifier.package.module" />
567 <capture number="4" name="haskell.identifier.type" />
666 <capture number="4" name="haskell.identifier.type" />
@@ -570,7 +669,13 @@
570 <expression>forall</expression>
669 <expression>forall</expression>
572 <scope name="haskell.identifier.type.variable">
671 <scope name="haskell.identifier.type.variable">
573− <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\w)*</expression>
672+ <expression>(?!=)((?!(\(|\)|\,))\S)((?!(\(|\)|\,))\S)*</expression>
674+ <scope name="haskell.keyword.construct.function-arrow">
675+ <expression>-></expression>
677+ <scope name="haskell.keyword.construct.fat-arrow">
678+ <expression>=></expression>
575 </collection>
680 </collection>
@@ -585,7 +690,6 @@
585 <template>^(?!\s+\1\S)(?!\s*$)</template>
690 <template>^(?!\s+\1\S)(?!\s*$)</template>
586 </ends-with>
691 </ends-with>
587 <subscopes>
692 <subscopes>
588− <include syntax="self" collection="comments" />
589 <scope name="haskell.keyword.construct.where">
693 <scope name="haskell.keyword.construct.where">
590 <expression>where</expression>
694 <expression>where</expression>
@@ -605,7 +709,6 @@
605 <capture number="1" name="haskell.type-list.bracket" />
709 <capture number="1" name="haskell.type-list.bracket" />
606 </ends-with>
710 </ends-with>
607 <subscopes>
711 <subscopes>
608− <include syntax="self" collection="comments" />
609 <include syntax="self" collection="type" />
712 <include syntax="self" collection="type" />
610 </subscopes>
713 </subscopes>
@@ -622,7 +725,6 @@
622 <capture number="1" name="haskell.keyword.construct.lambda" />
725 <capture number="1" name="haskell.keyword.construct.lambda" />
623 </ends-with>
726 </ends-with>
624 <subscopes>
727 <subscopes>
625− <include syntax="self" collection="comments" />
626 <include syntax="self" collection="pattern-match" />
728 <include syntax="self" collection="pattern-match" />
627 </subscopes>
729 </subscopes>
@@ -636,6 +738,7 @@
637 <collection name="where-clause">
739 <collection name="where-clause">
638 <scope name="haskell.construct.where">
740 <scope name="haskell.construct.where">
741+ <local scope="within-parent" />
639 <starts-with>
742 <starts-with>
640 <expression>^(\h*)(where)</expression>
743 <expression>^(\h*)(where)</expression>
641 <capture number="2" name="haskell.construct.keyword.where" />
744 <capture number="2" name="haskell.construct.keyword.where" />
@@ -644,7 +747,6 @@
644 <template>^(?!\1\s*\S)(?!s*$)</template>
747 <template>^(?!\1\s*\S)(?!s*$)</template>
645 </ends-with>
748 </ends-with>
646 <subscopes>
749 <subscopes>
647− <include syntax="self" collection="comments" />
648 <include syntax="self" collection="definition" />
750 <include syntax="self" collection="definition" />
649 </subscopes>
751 </subscopes>
@@ -684,12 +786,12 @@
686 <collection name="strings">
788 <collection name="strings">
687− <scope name="haskell.string.double-quoted" spell-check="true">
789+ <scope name="haskell.string.double-quoted">
688 <starts-with>
790 <starts-with>
689− <expression>"</expression>
791+ <expression>"</expression>
690 </starts-with>
792 </starts-with>
691 <ends-with>
793 <ends-with>
692− <expression>"</expression>
794+ <expression>"</expression>
693 </ends-with>
795 </ends-with>
694 <subscopes>
796 <subscopes>
695 <scope name="haskell.string.escape-sequences">
797 <scope name="haskell.string.escape-sequences">
@@ -726,7 +828,6 @@
726 </ends-with>
828 </ends-with>
727 <subscopes>
829 <subscopes>
728 <scope name="identifier.haskell.type">
830 <scope name="identifier.haskell.type">
729− <symbol type="expression" />
730 <symbol type="expression" />
831 <symbol type="expression" />
731 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
832 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
732 <capture number="1" name="identifier.type" />
833 <capture number="1" name="identifier.type" />
@@ -751,7 +852,6 @@
751 </ends-with>
852 </ends-with>
752 <subscopes>
853 <subscopes>
753 <scope name="haskell.construct.qualified">
854 <scope name="haskell.construct.qualified">
754− <symbol type="expression" />
755 <expression>qualified</expression>
855 <expression>qualified</expression>
756 <capture number="0" name="haskell.construct.keyword.qualified" />
856 <capture number="0" name="haskell.construct.keyword.qualified" />
@@ -769,7 +869,6 @@
769 </ends-with>
869 </ends-with>
770 <subscopes anchored="true">
870 <subscopes anchored="true">
771 <include syntax="self" collection="import-list" />
871 <include syntax="self" collection="import-list" />
772− <symbol type="expression" />
773 </subscopes>
872 </subscopes>
@@ -803,7 +902,6 @@
803 </ends-with>
902 </ends-with>
804 <subscopes>
903 <subscopes>
805 <scope name="haskell.identifier.struct">
904 <scope name="haskell.identifier.struct">
806− <symbol type="expression" />
807 <symbol type="reference" scope="local" />
905 <symbol type="reference" scope="local" />
808 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
906 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
809 <capture number="1" name="haskell.import-list.identifier.type.name" />
907 <capture number="1" name="haskell.import-list.identifier.type.name" />
@@ -817,6 +915,13 @@
818 </collection>
916 </collection>
918+ <!-- <collection name="special">
920+ <expression>(;|,)</expression>
820 <collection name="reservedop">
925 <collection name="reservedop">
821 <scope name="keyword.operator">
926 <scope name="keyword.operator">
822 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
927 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
@@ -824,11 +929,10 @@
824 </collection>
929 </collection>
826 <collection name="keywords">
931 <collection name="keywords">
827− <scope name="haskell.keyword.self">
932+ <scope name="haskell.keyword.modifier">
828 <symbol type="keyword" />
933 <symbol type="keyword" />
829 <strings>
934 <strings>
830 <string>do</string>
935 <string>do</string>
831− <string>mdo</string>
832 <string>in</string>
936 <string>in</string>
833 <string>infix</string>
937 <string>infix</string>
834 <string>infixl</string>
938 <string>infixl</string>
@@ -866,18 +970,20 @@
866 <strings>
970 <strings>
867 <string>undefined</string>
971 <string>undefined</string>
868 <string>_</string>
972 <string>_</string>
870 </strings>
973 </strings>
872 </collection>
975 </collection>
874 <collection name="comments">
977 <collection name="comments">
875 <scope name="haskell.comment.single" spell-check="true">
978 <scope name="haskell.comment.single" spell-check="true">
876− <symbol type="comment" />
979+ <starts-with>
980+ <expression>--</expression>
877− <expression> --.*$</expression>
983+ <expression>$</expression>
879 <scope name="haskell.comment.block" spell-check="true">
986 <scope name="haskell.comment.block" spell-check="true">
880− <symbol type="comment" />
881 <starts-with>
987 <starts-with>
882 <expression>{-</expression>
988 <expression>{-</expression>
883 </starts-with>
989 </starts-with>
@@ -889,4 +995,4 @@
891 </collections>
997 </collections>
892−</syntax>
998+</syntax>