@@ -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,8 @@
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" /> -->
61+ <include syntax="self" collection="data-definition" />
60 <include syntax="self" collection="GADT-definition" />
62 <include syntax="self" collection="GADT-definition" />
61 <include syntax="self" collection="instance" />
63 <include syntax="self" collection="instance" />
62 <include syntax="self" collection="typeclass" />
64 <include syntax="self" collection="typeclass" />
@@ -65,6 +67,7 @@
66 <template-scopes>
68 <template-scopes>
67 <include syntax="self" collection="Quote" />
69 <include syntax="self" collection="Quote" />
70+ <include syntax="self" collection="comments" />
68 </template-scopes>
71 </template-scopes>
70 <collections>
73 <collections>
@@ -77,27 +80,51 @@
77 </collection>
80 </collection>
79 <collection name="expressions">
82 <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" />
83+ <include syntax="self" collection="do-bind" />
90 <include syntax="self" collection="literal" />
84 <include syntax="self" collection="literal" />
91 <include syntax="self" collection="operators" />
85 <include syntax="self" collection="operators" />
92− <include syntax="self" collection="record-match" />
93 <include syntax="self" collection="list" />
86 <include syntax="self" collection="list" />
94− <include syntax="self" collection="view-pattern" />
95 <include syntax="self" collection="lambda-case" />
87 <include syntax="self" collection="lambda-case" />
96 <include syntax="self" collection="lambda-head" />
88 <include syntax="self" collection="lambda-head" />
97− <include syntax="self" collection="case-expression" />
89+ <include syntax="self" collection="type-applications" />
98− <include syntax="self" collection="qconid" />
90+ <include syntax="self" collection="outer-case-expression" />
99 <include syntax="self" collection="qvarid" />
91 <include syntax="self" collection="qvarid" />
100 <include syntax="self" collection="tuple" />
92 <include syntax="self" collection="tuple" />
95+ <!-- Needed for do binds -->
96+ <!-- <include syntax="self" collection="pattern-match" /> -->
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" />
110+ <collection name="type-applications">
111+ <scope name="type-applications">
113+ <expression>(\s@)\(</expression>
114+ <capture number="1" name="haskell.keyword.operator.typeapplication" />
117+ <expression>)</expression>
120+ <include syntax="self" collection="type" />
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" />
101 </collection>
128 </collection>
103 <collection name="Quote">
130 <collection name="Quote">
@@ -136,8 +163,8 @@
136 <capture number="1" name="haskell.pattern.record.bracket" />
163 <capture number="1" name="haskell.pattern.record.bracket" />
137 </ends-with>
164 </ends-with>
138 <subscopes>
165 <subscopes>
139− <include syntax="self" collection="comments" />
166+ <include syntax="self" collection="pattern-match" />
140− <include syntax="self" collection="expressions" />
167+ <include syntax="self" collection="varid" />
141 <scope name="record-sep">
168 <scope name="record-sep">
142 <expression>=</expression>
169 <expression>=</expression>
@@ -159,7 +186,6 @@
159 <capture number="1" name="haskell.pattern.record.bracket" />
186 <capture number="1" name="haskell.pattern.record.bracket" />
160 </ends-with>
187 </ends-with>
161 <subscopes>
188 <subscopes>
162− <include syntax="self" collection="comments" />
163 <scope name="haskell.pattern.record.wildcard">
189 <scope name="haskell.pattern.record.wildcard">
164 <expression>\.\.</expression>
190 <expression>\.\.</expression>
@@ -186,12 +212,29 @@
186 <capture number="1" name="haskell.list.bracket" />
212 <capture number="1" name="haskell.list.bracket" />
187 </ends-with>
213 </ends-with>
188 <subscopes>
214 <subscopes>
189− <include syntax="self" collection="comments" />
190 <include syntax="self" collection="expressions" />
215 <include syntax="self" collection="expressions" />
191 </subscopes>
216 </subscopes>
193 </collection>
218 </collection>
220+ <collection name="list-pattern">
221+ <symbol type="expression" />
222+ <scope name="haskell.pattern.list">
224+ <expression>(\[)</expression>
225+ <capture number="1" name="haskell.pattern.list.bracket" />
228+ <expression>(\])</expression>
229+ <capture number="1" name="haskell.pattern.list.bracket" />
232+ <include syntax="self" collection="pattern-match" />
195 <collection name="view-pattern">
238 <collection name="view-pattern">
196 <scope name="haskell.pattern.view">
239 <scope name="haskell.pattern.view">
197 <symbol type="expression" />
240 <symbol type="expression" />
@@ -208,7 +251,24 @@
208 <scope name="haskell.pattern.view.operator.arrow">
251 <scope name="haskell.pattern.view.operator.arrow">
209 <expression>-></expression>
252 <expression>-></expression>
211− <include syntax="self" collection="expressions" />
254+ <include syntax="self" collection="pattern-match" />
259+ <collection name="tuple-match">
260+ <symbol type="expression" />
261+ <scope name="haskell.pattern.tuple">
263+ <expression>(\()</expression>
264+ <capture number="1" name="haskell.pattern.tuple.bracket" />
267+ <expression>(\))</expression>
268+ <capture number="1" name="haskell.pattern.tuple.bracket" />
271+ <include syntax="self" collection="pattern-match" />
212 </subscopes>
272 </subscopes>
214 </collection>
274 </collection>
@@ -224,11 +284,53 @@
224 <capture number="1" name="haskell.case.keyword.condition" />
284 <capture number="1" name="haskell.case.keyword.condition" />
225 </ends-with>
285 </ends-with>
226 <subscopes anchored="true">
286 <subscopes anchored="true">
287+ <include syntax="self" collection="pattern-match" />
292+ <collection name="case-match">
293+ <scope name="case-match">
295+ <expression>(?=((\h*)\S.*->($|\h)))</expression>
298+ <expression>-></expression>
300+ <subscopes anchored="true">
301+ <include syntax="self" collection="pattern-match" />
306+ <collection name="inner-case-expressions">
307+ <scope name="inner-case-expressions">
309+ <expression>(?=((\h*)\S.*->($|\h)))</expression>
312+ <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
315+ <include syntax="self" collection="case-match" />
227 <include syntax="self" collection="expressions" />
316 <include syntax="self" collection="expressions" />
228 </subscopes>
317 </subscopes>
230 </collection>
319 </collection>
321+ <collection name="outer-case-expression">
322+ <scope name="outer-case-expression">
324+ <expression>(?=case)</expression>
327+ <subscopes anchored="true" skip-whitespace="false">
328+ <include syntax="self" collection="case-expression" />
329+ <include syntax="self" collection="inner-case-expressions" repeat="true" />
232 <collection name="tuple">
334 <collection name="tuple">
233 <symbol type="expression" />
335 <symbol type="expression" />
234 <scope name="haskell.tuple">
336 <scope name="haskell.tuple">
@@ -241,73 +343,60 @@
241 <capture number="1" name="haskell.tuple.bracket" />
343 <capture number="1" name="haskell.tuple.bracket" />
242 </ends-with>
344 </ends-with>
243 <subscopes>
345 <subscopes>
244− <include syntax="self" collection="comments" />
245 <include syntax="self" collection="expressions" />
346 <include syntax="self" collection="expressions" />
246 </subscopes>
347 </subscopes>
248 </collection>
349 </collection>
250 <collection name="typeclass">
351 <collection name="typeclass">
251− <scope name="haskell.definition.class.head">
352+ <symbol type="interface" />
252− <symbol type="class" scope="global" name-selector="haskell.keyword.construct.class.name">
353+ <scope name="haskell.definition.class">
253− <context behavior="whitespace" foldable="true" />
255 <starts-with>
354 <starts-with>
256 <expression>^(\h*)(class)($|\h)</expression>
355 <expression>^(\h*)(class)($|\h)</expression>
257 <capture number="2" name="haskell.keyword.construct.class" />
356 <capture number="2" name="haskell.keyword.construct.class" />
258 </starts-with>
357 </starts-with>
259− <ends-with />
358+ <ends-with>
260− <subscopes anchored="true">
359+ <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>
360+ </ends-with>
268− <subscopes>
361+ <subscopes>
269− <include syntax="self" collection="comments" />
270− <include syntax="self" collection="type" />
273− <scope name="haskell.keyword.construct.where" optional="true">
362+ <scope name="haskell.keyword.construct.where">
274 <expression>where</expression>
363 <expression>where</expression>
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" />
276 </subscopes>
369 </subscopes>
278 </collection>
371 </collection>
280 <collection name="instance">
373 <collection name="instance">
281 <scope name="haskell.instance">
374 <scope name="haskell.instance">
282− <symbol type="category" name-selector="haskell.keyword.construct.instance.name">
375+ <symbol type="category" />
283− <context behavior="whitespace" foldable="true" />
285 <starts-with>
376 <starts-with>
286 <expression>^(\h*)(instance)($|\h)</expression>
377 <expression>^(\h*)(instance)($|\h)</expression>
287 <capture number="2" name="haskell.keyword.construct.instance" />
378 <capture number="2" name="haskell.keyword.construct.instance" />
288 </starts-with>
379 </starts-with>
289− <ends-with />
380+ <ends-with>
290− <subscopes anchored="true">
381+ <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>
382+ </ends-with>
298− <subscopes>
383+ <subscopes>
299− <include syntax="self" collection="type" />
302− <scope name="haskell.keyword.construct.where" optional="true">
384+ <scope name="haskell.keyword.construct.where">
303 <expression>where</expression>
385 <expression>where</expression>
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" />
305 </subscopes>
391 </subscopes>
307 </collection>
393 </collection>
309 <collection name="type-family-definition">
395 <collection name="type-family-definition">
310 <scope name="haskell.definition.type-family.type">
396 <scope name="haskell.definition.type-family.type">
397+ <symbol type="type">
398+ <context behavior="subtree" foldable="false" />
311 <starts-with>
400 <starts-with>
312 <expression>^(\h*)(type\h+family)</expression>
401 <expression>^(\h*)(type\h+family)</expression>
313 <capture number="2" name="haskell.keyword.construct.type-family" />
402 <capture number="2" name="haskell.keyword.construct.type-family" />
@@ -346,7 +435,6 @@
346 <template>^(?!\s+\1\S)(?!\s*$)</template>
435 <template>^(?!\s+\1\S)(?!\s*$)</template>
347 </ends-with>
436 </ends-with>
348 <subscopes>
437 <subscopes>
349− <include syntax="self" collection="comments" />
350 <include syntax="self" collection="type" optional="true" repeat="true" />
438 <include syntax="self" collection="type" optional="true" repeat="true" />
352 <expression>=</expression>
440 <expression>=</expression>
@@ -359,26 +447,65 @@
359 <collection name="definition">
447 <collection name="definition">
360 <scope name="haskell.definition.type.function">
448 <scope name="haskell.definition.type.function">
361 <symbol type="function">
449 <symbol type="function">
362− <context behavior="whitespace" foldable="true" />
450+ <display-name>
451+ <component selector="haskell.definition.type.function" />
363 </symbol>
454 </symbol>
364 <starts-with>
455 <starts-with>
365 <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
456 <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
366 <capture number="2" name="haskell.keyword.construct.default" />
457 <capture number="2" name="haskell.keyword.construct.default" />
367− <capture number="3" name="haskell.identifier.function.name" />
458+ <capture number="3" name="haskell.identifier.function" />
368 </starts-with>
459 </starts-with>
369 <ends-with>
460 <ends-with>
370 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
461 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
371 </ends-with>
462 </ends-with>
372 <subscopes>
463 <subscopes>
373− <include syntax="self" collection="comments" />
374 <include syntax="self" collection="type-annotation" />
464 <include syntax="self" collection="type-annotation" />
375 <include syntax="self" collection="implementation" />
465 <include syntax="self" collection="implementation" />
376 </subscopes>
466 </subscopes>
378 </collection>
468 </collection>
470+ <collection name="do-bind">
471+ <scope name="do-bind">
473+ <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
476+ <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
479+ <include syntax="self" collection="do-pattern" />
480+ <include syntax="self" collection="expressions" />
481+ <!-- <scope name="bind-arrow">
482+ <expression><-</expression>
488+ <collection name="do-pattern">
489+ <scope name="do-pattern">
491+ <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
494+ <expression><-</expression>
497+ <include syntax="self" collection="pattern-match" />
498+ <!-- <scope name="bind-arrow">
499+ <expression><-</expression>
501+ <include syntax="self" collection="expressions" repeat="true" /> -->
380 <collection name="implementation">
506 <collection name="implementation">
381− <scope name="haskell.definition.type.function.implementation">
507+ <scope name="haskell.definition.type.function">
508+ <local scope="within-construct" />
382 <starts-with>
509 <starts-with>
383 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
510 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
384 <capture number="2" name="haskell.keyword.construct.default" />
511 <capture number="2" name="haskell.keyword.construct.default" />
@@ -388,20 +515,14 @@
388 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
515 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
389 </ends-with>
516 </ends-with>
390 <subscopes>
517 <subscopes>
391− <include syntax="self" collection="comments" />
518+ <include syntax="self" collection="where-clause" />
392− <include syntax="self" collection="pattern-match" optional="true" repeat="true" />
519+ <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>
520 </subscopes>
401 </collection>
522 </collection>
403 <collection name="type-annotation">
524 <collection name="type-annotation">
404− <scope name="haskell.definition.type.function.type-signature">
525+ <scope name="haskell.definition.type.function">
405 <starts-with>
526 <starts-with>
406 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
527 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
407 <capture number="2" name="haskell.identifier.function" />
528 <capture number="2" name="haskell.identifier.function" />
@@ -410,7 +531,6 @@
410 <template>^(?!\s+\1\S)(?!\s*$)</template>
531 <template>^(?!\s+\1\S)(?!\s*$)</template>
411 </ends-with>
532 </ends-with>
412 <subscopes>
533 <subscopes>
413− <include syntax="self" collection="comments" />
414 <include syntax="self" collection="type" />
534 <include syntax="self" collection="type" />
415 </subscopes>
535 </subscopes>
@@ -418,19 +538,15 @@
419 <collection name="type-definition">
539 <collection name="type-definition">
420 <scope name="haskell.definition.type">
540 <scope name="haskell.definition.type">
421− <symbol type="type" scope="global">
422− <context behavior="whitespace" foldable="true" />
424 <starts-with>
541 <starts-with>
425 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
542 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
426 <capture number="2" name="haskell.keyword.construct.type" />
543 <capture number="2" name="haskell.keyword.construct.type" />
427− <capture number="3" name="haskell.identifier.type.name" />
544+ <capture number="3" name="haskell.identifier.type" />
428 </starts-with>
545 </starts-with>
429 <ends-with>
546 <ends-with>
430 <template>^(?!\s+\1\S)(?!\s*$)</template>
547 <template>^(?!\s+\1\S)(?!\s*$)</template>
431 </ends-with>
548 </ends-with>
432 <subscopes>
549 <subscopes>
433− <include syntax="self" collection="comments" />
434 <include syntax="self" collection="type" />
550 <include syntax="self" collection="type" />
435 </subscopes>
551 </subscopes>
@@ -438,72 +554,66 @@
439 <collection name="GADT-definition">
555 <collection name="GADT-definition">
440 <scope name="haskell.definition.struct.GADT">
556 <scope name="haskell.definition.struct.GADT">
441− <symbol type="struct" scope="global">
442− <context behavior="subtree" foldable="false" />
444 <starts-with>
557 <starts-with>
445− <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
558+ <expression>^(\h*)(data)\h+(\w(\w|')*)</expression>
446 <capture number="2" name="haskell.keyword.construct.data.GADT" />
559 <capture number="2" name="haskell.keyword.construct.data.GADT" />
447− <capture number="3" name="haskell.identifier.data.type.name" />
448 </starts-with>
560 </starts-with>
449 <ends-with>
561 <ends-with>
450 <template>^(?!\s+\1\S)(?!\s*$)</template>
562 <template>^(?!\s+\1\S)(?!\s*$)</template>
451 </ends-with>
563 </ends-with>
452 <subscopes>
564 <subscopes>
453− <include syntax="self" collection="comments" />
454− <scope name="haskell.keyword.construct.where">
455− <expression>where</expression>
458− <include syntax="self" collection="deriving-clause" />
459− <include syntax="self" collection="record-definition" />
460 <include syntax="self" collection="gadt-constructor" />
565 <include syntax="self" collection="gadt-constructor" />
461 <include syntax="self" collection="type" />
566 <include syntax="self" collection="type" />
567+ <include syntax="self" collection="record-definition" />
568+ <include syntax="self" collection="record-definition-field-name" />
462 </subscopes>
569 </subscopes>
464 </collection>
571 </collection>
466 <collection name="gadt-constructor">
573 <collection name="gadt-constructor">
467− <scope name="haskell.identifier.type.struct.data.constructor">
574+ <scope name="identifier.type.struct.GADT.constructor">
468− <symbol type="constructor">
575+ <expression>^\h+[A-Z](\w|')*</expression>
469− <context behavior="subtree" foldable="true" />
576+ </scope>
470− </symbol>
577+ </collection>
579+ <collection name="data-definition">
580+ <scope name="haskell.definition.struct.data">
471 <starts-with>
581 <starts-with>
472− <expression>(^|=|\||^)\h+([A-Z](\w|')*)</expression>
582+ <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
473− <capture number="2" name="haskell.identifier.data.name" />
583+ <capture number="2" name="haskell.keyword.construct.data.newtype" />
584+ <capture number="3" name="haskell.identifier.type" />
474 </starts-with>
585 </starts-with>
475− <ends-with />
586+ <ends-with>
587+ <template>^(?!\s+\1\S)(?!\s*$)</template>
476− <subscopes anchored="true">
589+ <subscopes>
477 <include syntax="self" collection="record-definition" />
590 <include syntax="self" collection="record-definition" />
591+ <include syntax="self" collection="data-constructor" />
592+ <include syntax="self" collection="type" />
478 </subscopes>
593 </subscopes>
480 </collection>
595 </collection>
482− <collection name="deriving-clause">
597+ <collection name="data-constructor">
483− <scope name="haskell.record.construct.deriving.keyword">
598+ <scope name="haskell.identifier.type.struct.data.constructor">
484− <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
599+ <expression>=\h+[A-Z](\w|')*</expression>
486− <scope name="haskell.record.construct.deriving.keyword">
601+ <scope name="haskell.identifier.type.struct.data.constructor">
487− <include syntax="self" collection="comments" />
488− <expression>via</expression>
602+ <expression>\|\h+[A-Z](\w|')*</expression>
490 </collection>
604 </collection>
492 <collection name="record-definition">
606 <collection name="record-definition">
493 <scope name="haskell.record">
607 <scope name="haskell.record">
495− <context behavior="subtree" foldable="true" />
497 <starts-with>
608 <starts-with>
498− <expression>(?=\{)</expression>
609+ <expression>(\{)</expression>
499− <capture number="0" name="haskell.record.bracket" />
610+ <capture number="1" name="haskell.record.bracket" />
500 </starts-with>
611 </starts-with>
501 <ends-with>
612 <ends-with>
502 <expression>(\})</expression>
613 <expression>(\})</expression>
503 <capture number="1" name="haskell.record.bracket" />
614 <capture number="1" name="haskell.record.bracket" />
504 </ends-with>
615 </ends-with>
505 <subscopes>
616 <subscopes>
506− <include syntax="self" collection="comments" />
507 <include syntax="self" collection="record-definition-field-name" />
617 <include syntax="self" collection="record-definition-field-name" />
508 <include syntax="self" collection="type" />
618 <include syntax="self" collection="type" />
509 </subscopes>
619 </subscopes>
@@ -512,21 +622,11 @@
513 <collection name="record-definition-field-name">
623 <collection name="record-definition-field-name">
514 <scope name="haskell.record.definition.property">
624 <scope name="haskell.record.definition.property">
515− <symbol type="property" />
516− <expression>(((?![A-Z])\w(\w|')*)\h*::|(^|\{|,)\h*((?![A-Z])\w(\w|')*))</expression>
625+ <expression>\w(\w|')*\h*::</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" />
520 </collection>
627 </collection>
522 <collection name="type">
629 <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">
630 <scope name="haskell.type.construct.tuple">
531 <starts-with>
631 <starts-with>
532 <expression>\(</expression>
632 <expression>\(</expression>
@@ -535,7 +635,6 @@
535 <expression>\)</expression>
635 <expression>\)</expression>
536 </ends-with>
636 </ends-with>
537 <subscopes>
637 <subscopes>
538− <include syntax="self" collection="comments" />
539 <scope name="haskell.construct.type.typle.comma">
638 <scope name="haskell.construct.type.typle.comma">
540 <expression>\,</expression>
639 <expression>\,</expression>
@@ -550,7 +649,6 @@
550 <expression>\]</expression>
649 <expression>\]</expression>
551 </ends-with>
650 </ends-with>
552 <subscopes>
651 <subscopes>
553− <include syntax="self" collection="comments" />
554 <include syntax="self" collection="type" />
652 <include syntax="self" collection="type" />
555 </subscopes>
653 </subscopes>
@@ -562,7 +660,7 @@
563 <include syntax="self" collection="type-list" />
661 <include syntax="self" collection="type-list" />
565− <expression>(([A-Z](\w|')*\.)*)'*\!?([A-Z](\w|')*)</expression>
663+ <expression>(([A-Z](\w|')*\.)*)'*([A-Z](\w|')*)</expression>
566 <capture number="1" name="haskell.identifier.package.module" />
664 <capture number="1" name="haskell.identifier.package.module" />
567 <capture number="4" name="haskell.identifier.type" />
665 <capture number="4" name="haskell.identifier.type" />
@@ -570,7 +668,13 @@
570 <expression>forall</expression>
668 <expression>forall</expression>
572 <scope name="haskell.identifier.type.variable">
670 <scope name="haskell.identifier.type.variable">
573− <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\w)*</expression>
671+ <expression>(?!=)((?!(\(|\)|\,))\S)((?!(\(|\)|\,))\S)*</expression>
673+ <scope name="haskell.keyword.construct.function-arrow">
674+ <expression>-></expression>
676+ <scope name="haskell.keyword.construct.fat-arrow">
677+ <expression>=></expression>
575 </collection>
679 </collection>
@@ -585,7 +689,6 @@
585 <template>^(?!\s+\1\S)(?!\s*$)</template>
689 <template>^(?!\s+\1\S)(?!\s*$)</template>
586 </ends-with>
690 </ends-with>
587 <subscopes>
691 <subscopes>
588− <include syntax="self" collection="comments" />
589 <scope name="haskell.keyword.construct.where">
692 <scope name="haskell.keyword.construct.where">
590 <expression>where</expression>
693 <expression>where</expression>
@@ -605,7 +708,6 @@
605 <capture number="1" name="haskell.type-list.bracket" />
708 <capture number="1" name="haskell.type-list.bracket" />
606 </ends-with>
709 </ends-with>
607 <subscopes>
710 <subscopes>
608− <include syntax="self" collection="comments" />
609 <include syntax="self" collection="type" />
711 <include syntax="self" collection="type" />
610 </subscopes>
712 </subscopes>
@@ -622,7 +724,6 @@
622 <capture number="1" name="haskell.keyword.construct.lambda" />
724 <capture number="1" name="haskell.keyword.construct.lambda" />
623 </ends-with>
725 </ends-with>
624 <subscopes>
726 <subscopes>
625− <include syntax="self" collection="comments" />
626 <include syntax="self" collection="pattern-match" />
727 <include syntax="self" collection="pattern-match" />
627 </subscopes>
728 </subscopes>
@@ -636,6 +737,7 @@
637 <collection name="where-clause">
738 <collection name="where-clause">
638 <scope name="haskell.construct.where">
739 <scope name="haskell.construct.where">
740+ <local scope="within-parent" />
639 <starts-with>
741 <starts-with>
640 <expression>^(\h*)(where)</expression>
742 <expression>^(\h*)(where)</expression>
641 <capture number="2" name="haskell.construct.keyword.where" />
743 <capture number="2" name="haskell.construct.keyword.where" />
@@ -644,7 +746,6 @@
644 <template>^(?!\1\s*\S)(?!s*$)</template>
746 <template>^(?!\1\s*\S)(?!s*$)</template>
645 </ends-with>
747 </ends-with>
646 <subscopes>
748 <subscopes>
647− <include syntax="self" collection="comments" />
648 <include syntax="self" collection="definition" />
749 <include syntax="self" collection="definition" />
649 </subscopes>
750 </subscopes>
@@ -684,12 +785,12 @@
686 <collection name="strings">
787 <collection name="strings">
687− <scope name="haskell.string.double-quoted" spell-check="true">
788+ <scope name="haskell.string.double-quoted">
688 <starts-with>
789 <starts-with>
689− <expression>"</expression>
790+ <expression>"</expression>
690 </starts-with>
791 </starts-with>
691 <ends-with>
792 <ends-with>
692− <expression>"</expression>
793+ <expression>"</expression>
693 </ends-with>
794 </ends-with>
694 <subscopes>
795 <subscopes>
695 <scope name="haskell.string.escape-sequences">
796 <scope name="haskell.string.escape-sequences">
@@ -726,7 +827,6 @@
726 </ends-with>
827 </ends-with>
727 <subscopes>
828 <subscopes>
728 <scope name="identifier.haskell.type">
829 <scope name="identifier.haskell.type">
729− <symbol type="expression" />
730 <symbol type="expression" />
830 <symbol type="expression" />
731 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
831 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
732 <capture number="1" name="identifier.type" />
832 <capture number="1" name="identifier.type" />
@@ -751,7 +851,6 @@
751 </ends-with>
851 </ends-with>
752 <subscopes>
852 <subscopes>
753 <scope name="haskell.construct.qualified">
853 <scope name="haskell.construct.qualified">
754− <symbol type="expression" />
755 <expression>qualified</expression>
854 <expression>qualified</expression>
756 <capture number="0" name="haskell.construct.keyword.qualified" />
855 <capture number="0" name="haskell.construct.keyword.qualified" />
@@ -769,7 +868,6 @@
769 </ends-with>
868 </ends-with>
770 <subscopes anchored="true">
869 <subscopes anchored="true">
771 <include syntax="self" collection="import-list" />
870 <include syntax="self" collection="import-list" />
772− <symbol type="expression" />
773 </subscopes>
871 </subscopes>
@@ -803,7 +901,6 @@
803 </ends-with>
901 </ends-with>
804 <subscopes>
902 <subscopes>
805 <scope name="haskell.identifier.struct">
903 <scope name="haskell.identifier.struct">
806− <symbol type="expression" />
807 <symbol type="reference" scope="local" />
904 <symbol type="reference" scope="local" />
808 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
905 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
809 <capture number="1" name="haskell.import-list.identifier.type.name" />
906 <capture number="1" name="haskell.import-list.identifier.type.name" />
@@ -817,6 +914,13 @@
818 </collection>
915 </collection>
917+ <!-- <collection name="special">
919+ <expression>(;|,)</expression>
820 <collection name="reservedop">
924 <collection name="reservedop">
821 <scope name="keyword.operator">
925 <scope name="keyword.operator">
822 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
926 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
@@ -824,11 +928,10 @@
824 </collection>
928 </collection>
826 <collection name="keywords">
930 <collection name="keywords">
827− <scope name="haskell.keyword.self">
931+ <scope name="haskell.keyword.modifier">
828 <symbol type="keyword" />
932 <symbol type="keyword" />
829 <strings>
933 <strings>
830 <string>do</string>
934 <string>do</string>
831− <string>mdo</string>
832 <string>in</string>
935 <string>in</string>
833 <string>infix</string>
936 <string>infix</string>
834 <string>infixl</string>
937 <string>infixl</string>
@@ -866,18 +969,20 @@
866 <strings>
969 <strings>
867 <string>undefined</string>
970 <string>undefined</string>
868 <string>_</string>
971 <string>_</string>
870 </strings>
972 </strings>
872 </collection>
974 </collection>
874 <collection name="comments">
976 <collection name="comments">
875 <scope name="haskell.comment.single" spell-check="true">
977 <scope name="haskell.comment.single" spell-check="true">
876− <symbol type="comment" />
978+ <starts-with>
979+ <expression>--</expression>
877− <expression> --.*$</expression>
982+ <expression>$</expression>
879 <scope name="haskell.comment.block" spell-check="true">
985 <scope name="haskell.comment.block" spell-check="true">
880− <symbol type="comment" />
881 <starts-with>
986 <starts-with>
882 <expression>{-</expression>
987 <expression>{-</expression>
883 </starts-with>
988 </starts-with>
@@ -889,4 +994,4 @@
891 </collections>
996 </collections>
892−</syntax>
997+</syntax>