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