@@ -41,7 +41,7 @@
4141 <indentation>
4242 <increase>
4343 <expression>
44− (case|class|do|let|where|=).*
44+ (case|class|do|let|where).*
4545 </expression>
4646 </increase>
4747 <decrease>
@@ -57,6 +57,8 @@
5757 <include syntax="self" collection="type-family-definition" />
5858 <include syntax="self" collection="pattern-definition" />
5959 <include syntax="self" collection="type-definition" />
60+ <!-- <include syntax="self" collection="type-annotation" /> -->
61+ <include syntax="self" collection="data-definition" />
6062 <include syntax="self" collection="GADT-definition" />
6163 <include syntax="self" collection="instance" />
6264 <include syntax="self" collection="typeclass" />
@@ -65,6 +67,7 @@
6567
6668 <template-scopes>
6769 <include syntax="self" collection="Quote" />
70+ <include syntax="self" collection="comments" />
6871 </template-scopes>
6972
7073 <collections>
@@ -77,27 +80,53 @@
7780 </collection>
7881
7982 <collection name="expressions">
80− <scope name="haskell.construct.keyword.at">
81− <expression>@</expression>
82− </scope>
83− <scope name="haskell.construct.keyword.case-arrow">
84− <expression>-></expression>
85− </scope>
86− <scope name="haskell.construct.keyword.bind-arrow">
87− <expression><-</expression>
88− </scope>
89− <include syntax="self" collection="keywords" />
83+ <include syntax="self" collection="do-bind" />
9084 <include syntax="self" collection="literal" />
9185 <include syntax="self" collection="operators" />
92− <include syntax="self" collection="record-match" />
9386 <include syntax="self" collection="list" />
94− <include syntax="self" collection="view-pattern" />
9587 <include syntax="self" collection="lambda-case" />
9688 <include syntax="self" collection="lambda-head" />
89+ <include syntax="self" collection="type-applications" />
9790 <include syntax="self" collection="case-expression" />
98− <include syntax="self" collection="qconid" />
9991 <include syntax="self" collection="qvarid" />
92+ <include syntax="self" collection="bind-arrow" />
10093 <include syntax="self" collection="tuple" />
94+
95+
96+
97+ <!-- Needed for do binds -->
98+ <!-- <include syntax="self" collection="pattern-match" /> -->
99+ </collection>
100+
101+ <collection name="pattern-match">
102+ <include syntax="self" collection="literal" />
103+ <include syntax="self" collection="view-pattern" />
104+ <include syntax="self" collection="tuple-match" />
105+<!-- <include syntax="self" collection="at-pattern" /> -->
106+ <include syntax="self" collection="varid" />
107+ <include syntax="self" collection="qconid" />
108+ <include syntax="self" collection="record-match" />
109+ <include syntax="self" collection="list-pattern" />
110+ </collection>
111+
112+ <collection name="type-applications">
113+ <scope name="type-applications">
114+ <starts-with>
115+ <expression>(\s@)\(</expression>
116+ <capture number="1" name="haskell.keyword.operator.typeapplication" />
117+ </starts-with>
118+ <ends-with>
119+ <expression>)</expression>
120+ </ends-with>
121+ <subscopes>
122+ <include syntax="self" collection="type" />
123+ </subscopes>
124+ </scope>
125+ <scope name="type-applications-single">
126+ <expression>(@)(\w+)</expression>
127+ <capture number="1" name="haskell.keyword.operator.typeapplication" />
128+ <capture number="2" name="haskell.identifier.type" />
129+ </scope>
101130 </collection>
102131
103132 <collection name="Quote">
@@ -136,8 +165,8 @@
136165 <capture number="1" name="haskell.pattern.record.bracket" />
137166 </ends-with>
138167 <subscopes>
139− <include syntax="self" collection="comments" />
140− <include syntax="self" collection="expressions" />
168+ <include syntax="self" collection="pattern-match" />
169+ <include syntax="self" collection="varid" />
141170 <scope name="record-sep">
142171 <expression>=</expression>
143172 </scope>
@@ -159,7 +188,6 @@
159188 <capture number="1" name="haskell.pattern.record.bracket" />
160189 </ends-with>
161190 <subscopes>
162− <include syntax="self" collection="comments" />
163191 <scope name="haskell.pattern.record.wildcard">
164192 <expression>\.\.</expression>
165193 </scope>
@@ -186,12 +214,29 @@
186214 <capture number="1" name="haskell.list.bracket" />
187215 </ends-with>
188216 <subscopes>
189− <include syntax="self" collection="comments" />
190217 <include syntax="self" collection="expressions" />
191218 </subscopes>
192219 </scope>
193220 </collection>
194221
222+ <collection name="list-pattern">
223+ <symbol type="expression" />
224+ <scope name="haskell.pattern.list">
225+ <starts-with>
226+ <expression>(\[)</expression>
227+ <capture number="1" name="haskell.pattern.list.bracket" />
228+ </starts-with>
229+ <ends-with>
230+ <expression>(\])</expression>
231+ <capture number="1" name="haskell.pattern.list.bracket" />
232+ </ends-with>
233+ <subscopes>
234+ <include syntax="self" collection="pattern-match" />
235+ </subscopes>
236+ </scope>
237+ </collection>
238+
239+
195240 <collection name="view-pattern">
196241 <scope name="haskell.pattern.view">
197242 <symbol type="expression" />
@@ -208,7 +253,24 @@
208253 <scope name="haskell.pattern.view.operator.arrow">
209254 <expression>-></expression>
210255 </scope>
211− <include syntax="self" collection="expressions" />
256+ <include syntax="self" collection="pattern-match" />
257+ </subscopes>
258+ </scope>
259+ </collection>
260+
261+ <collection name="tuple-match">
262+ <symbol type="expression" />
263+ <scope name="haskell.pattern.tuple">
264+ <starts-with>
265+ <expression>(\()</expression>
266+ <capture number="1" name="haskell.pattern.tuple.bracket" />
267+ </starts-with>
268+ <ends-with>
269+ <expression>(\))</expression>
270+ <capture number="1" name="haskell.pattern.tuple.bracket" />
271+ </ends-with>
272+ <subscopes>
273+ <include syntax="self" collection="pattern-match" />
212274 </subscopes>
213275 </scope>
214276 </collection>
@@ -223,7 +285,7 @@
223285 <expression>(of)</expression>
224286 <capture number="1" name="haskell.case.keyword.condition" />
225287 </ends-with>
226− <subscopes anchored="true">
288+ <subscopes>
227289 <include syntax="self" collection="expressions" />
228290 </subscopes>
229291 </scope>
@@ -241,117 +303,70 @@
241303 <capture number="1" name="haskell.tuple.bracket" />
242304 </ends-with>
243305 <subscopes>
244− <include syntax="self" collection="comments" />
245306 <include syntax="self" collection="expressions" />
246307 </subscopes>
247308 </scope>
248309 </collection>
249310
250311 <collection name="typeclass">
251− <scope name="haskell.definition.class.head">
252− <symbol type="class" scope="global" name-selector="haskell.keyword.construct.class.name">
253− <context behavior="whitespace" foldable="true" />
254− </symbol>
312+ <symbol type="interface" />
313+ <scope name="haskell.definition.class">
255314 <starts-with>
256315 <expression>^(\h*)(class)($|\h)</expression>
257316 <capture number="2" name="haskell.keyword.construct.class" />
258317 </starts-with>
259− <ends-with />
260− <subscopes anchored="true">
261− <scope name="haskell.keyword.construct.class.name">
262− <starts-with>
263− <expression></expression>
264− </starts-with>
265− <ends-with>
266− <expression>(?=(where|^\s*$))</expression>
267− </ends-with>
268− <subscopes>
269− <include syntax="self" collection="comments" />
270− <include syntax="self" collection="type" />
271− </subscopes>
272− </scope>
273− <scope name="haskell.keyword.construct.where" optional="true">
318+ <ends-with>
319+ <template>^(?!\s+\1\S)(?!\s*$)</template>
320+ </ends-with>
321+ <subscopes>
322+ <scope name="haskell.keyword.construct.where">
274323 <expression>where</expression>
275324 </scope>
325+ <include syntax="self" collection="type" />
326+ <include syntax="self" collection="type-definition" />
327+ <!-- <include syntax="self" collection="type-annotation" /> -->
328+ <include syntax="self" collection="definition" />
276329 </subscopes>
277330 </scope>
278331 </collection>
279332
280333 <collection name="instance">
281334 <scope name="haskell.instance">
282− <symbol type="category" name-selector="haskell.keyword.construct.instance.name">
283− <context behavior="whitespace" foldable="true" />
284− </symbol>
335+ <symbol type="category" />
285336 <starts-with>
286337 <expression>^(\h*)(instance)($|\h)</expression>
287338 <capture number="2" name="haskell.keyword.construct.instance" />
288339 </starts-with>
289− <ends-with />
290− <subscopes anchored="true">
291− <scope name="haskell.keyword.construct.instance.name">
292− <starts-with>
293− <expression></expression>
294− </starts-with>
295− <ends-with>
296− <expression>(?=(where|^\s*$))</expression>
297− </ends-with>
298− <subscopes>
299− <include syntax="self" collection="type" />
300− </subscopes>
301− </scope>
302− <scope name="haskell.keyword.construct.where" optional="true">
303− <expression>where</expression>
304− </scope>
305− </subscopes>
306− </scope>
307− </collection>
308−
309− <collection name="type-family-definition">
310− <scope name="haskell.definition.type-family.type">
311− <starts-with>
312− <expression>^(\h*)(type\h+family)</expression>
313− <capture number="2" name="haskell.keyword.construct.type-family" />
314− </starts-with>
315340 <ends-with>
316341 <template>^(?!\s+\1\S)(?!\s*$)</template>
317342 </ends-with>
318− <subscopes anchored="true" skip-whitespace="false">
319− <scope name="haskell.type-family.head">
320− <starts-with>
321− <expression></expression>
322− </starts-with>
323− <ends-with>
324− <expression>where</expression>
325− <capture number="0" name="haskell.keyword.construct.where" />
326− </ends-with>
327− <subscopes anchored="true">
328− <scope name="haskell.identifier.type-family.type.name">
329− <expression>\S+</expression>
330− </scope>
331− <include syntax="self" collection="type" repeat="true" optional="true" />
332− </subscopes>
343+ <subscopes>
344+ <scope name="haskell.keyword.construct.where">
345+ <expression>where</expression>
333346 </scope>
334−
335− <include syntax="self" collection="type-family-case-definition" optional="true" repeat="true" />
347+ <include syntax="self" collection="type" />
348+ <include syntax="self" collection="type-definition" />
349+ <include syntax="self" collection="type-annotation" />
350+ <include syntax="self" collection="definition" />
336351 </subscopes>
337352 </scope>
338353 </collection>
339354
340− <collection name="type-family-case-definition">
341− <scope name="haskell.definition.type-family.type.case">
355+ <collection name="type-family-definition">
356+ <scope name="haskell.definition.type.type-family">
357+ <symbol type="type" />
342358 <starts-with>
343− <expression>^(\h*)(?=\S)</expression>
359+ <expression>^(\h*)(type\h+family)\h+`?(\w(\w|')*)`?($|\h)</expression>
360+ <capture number="2" name="haskell.keyword.construct.type-family" />
344361 </starts-with>
345362 <ends-with>
346363 <template>^(?!\s+\1\S)(?!\s*$)</template>
347364 </ends-with>
348365 <subscopes>
349− <include syntax="self" collection="comments" />
350− <include syntax="self" collection="type" optional="true" repeat="true" />
351− <scope>
352− <expression>=</expression>
366+ <scope name="haskell.keyword.construct.where">
367+ <expression>where</expression>
353368 </scope>
354− <include syntax="self" collection="type" optional="true" repeat="true" />
369+ <include syntax="self" collection="type" />
355370 </subscopes>
356371 </scope>
357372 </collection>
@@ -359,26 +374,47 @@
359374 <collection name="definition">
360375 <scope name="haskell.definition.type.function">
361376 <symbol type="function">
362− <context behavior="whitespace" foldable="true" />
377+ <display-name>
378+ <component selector="haskell.definition.type.function" />
379+ </display-name>
380+
363381 </symbol>
364382 <starts-with>
365383 <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
366384 <capture number="2" name="haskell.keyword.construct.default" />
367− <capture number="3" name="haskell.identifier.function.name" />
385+ <capture number="3" name="haskell.identifier.function" />
368386 </starts-with>
369387 <ends-with>
370388 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
371389 </ends-with>
372390 <subscopes>
373− <include syntax="self" collection="comments" />
374391 <include syntax="self" collection="type-annotation" />
375392 <include syntax="self" collection="implementation" />
376393 </subscopes>
377394 </scope>
378395 </collection>
379396
397+ <collection name="do-bind">
398+ <scope name="do-bind">
399+ <starts-with>
400+ <expression>^(?=(\h*).+<-($|\h))</expression>
401+ </starts-with>
402+ <ends-with>
403+ <template>^(?!\0)(?!\s+\1\S)(?!\s*$)</template>
404+ </ends-with>
405+ <subscopes anchored="true">
406+ <include syntax="self" collection="pattern-match" />
407+ <scope name="bind-arrow">
408+ <expression><-</expression>
409+ </scope>
410+ <include syntax="self" collection="expressions" repeat="true" />
411+ </subscopes>
412+ </scope>
413+ </collection>
414+
380415 <collection name="implementation">
381− <scope name="haskell.definition.type.function.implementation">
416+ <scope name="haskell.definition.type.function">
417+ <local scope="within-construct" />
382418 <starts-with>
383419 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
384420 <capture number="2" name="haskell.keyword.construct.default" />
@@ -388,20 +424,14 @@
388424 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
389425 </ends-with>
390426 <subscopes>
391− <include syntax="self" collection="comments" />
392− <include syntax="self" collection="pattern-match" optional="true" repeat="true" />
393− <scope>
394− <expression>=</expression>
395− <capture number="0" name="haskell.construct.function.keyword.eq" />
396− </scope>
397− <include syntax="self" collection="expressions" optional="true" repeat="true" />
398− <include syntax="self" collection="where-clause" optional="true" />
427+ <include syntax="self" collection="where-clause" />
428+ <include syntax="self" collection="expressions" />
399429 </subscopes>
400430 </scope>
401431 </collection>
402432
403433 <collection name="type-annotation">
404− <scope name="haskell.definition.type.function.type-signature">
434+ <scope name="haskell.definition.type.function">
405435 <starts-with>
406436 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
407437 <capture number="2" name="haskell.identifier.function" />
@@ -410,7 +440,6 @@
410440 <template>^(?!\s+\1\S)(?!\s*$)</template>
411441 </ends-with>
412442 <subscopes>
413− <include syntax="self" collection="comments" />
414443 <include syntax="self" collection="type" />
415444 </subscopes>
416445 </scope>
@@ -418,19 +447,15 @@
418447
419448 <collection name="type-definition">
420449 <scope name="haskell.definition.type">
421− <symbol type="type" scope="global">
422− <context behavior="whitespace" foldable="true" />
423− </symbol>
424450 <starts-with>
425451 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
426452 <capture number="2" name="haskell.keyword.construct.type" />
427− <capture number="3" name="haskell.identifier.type.name" />
453+ <capture number="3" name="haskell.identifier.type" />
428454 </starts-with>
429455 <ends-with>
430456 <template>^(?!\s+\1\S)(?!\s*$)</template>
431457 </ends-with>
432458 <subscopes>
433− <include syntax="self" collection="comments" />
434459 <include syntax="self" collection="type" />
435460 </subscopes>
436461 </scope>
@@ -438,72 +463,66 @@
438463
439464 <collection name="GADT-definition">
440465 <scope name="haskell.definition.struct.GADT">
441− <symbol type="struct" scope="global">
442− <context behavior="subtree" foldable="false" />
443− </symbol>
444466 <starts-with>
445− <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
467+ <expression>^(\h*)(data)\h+(\w(\w|')*)</expression>
446468 <capture number="2" name="haskell.keyword.construct.data.GADT" />
447− <capture number="3" name="haskell.identifier.data.type.name" />
448469 </starts-with>
449470 <ends-with>
450471 <template>^(?!\s+\1\S)(?!\s*$)</template>
451472 </ends-with>
452473 <subscopes>
453− <include syntax="self" collection="comments" />
454− <scope name="haskell.keyword.construct.where">
455− <expression>where</expression>
456− </scope>
457−
458− <include syntax="self" collection="deriving-clause" />
459− <include syntax="self" collection="record-definition" />
460474 <include syntax="self" collection="gadt-constructor" />
461475 <include syntax="self" collection="type" />
476+ <include syntax="self" collection="record-definition" />
477+ <include syntax="self" collection="record-definition-field-name" />
462478 </subscopes>
463479 </scope>
464480 </collection>
465481
466482 <collection name="gadt-constructor">
467− <scope name="haskell.identifier.type.struct.data.constructor">
468− <symbol type="constructor">
469− <context behavior="subtree" foldable="true" />
470− </symbol>
483+ <scope name="identifier.type.struct.GADT.constructor">
484+ <expression>^\h+[A-Z](\w|')*</expression>
485+ </scope>
486+ </collection>
487+
488+ <collection name="data-definition">
489+ <scope name="haskell.definition.struct.data">
471490 <starts-with>
472− <expression>(^|=|\||^)\h+([A-Z](\w|')*)</expression>
473− <capture number="2" name="haskell.identifier.data.name" />
491+ <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
492+ <capture number="2" name="haskell.keyword.construct.data.newtype" />
493+ <capture number="3" name="haskell.identifier.type" />
474494 </starts-with>
475− <ends-with />
476− <subscopes anchored="true">
495+ <ends-with>
496+ <template>^(?!\s+\1\S)(?!\s*$)</template>
497+ </ends-with>
498+ <subscopes>
477499 <include syntax="self" collection="record-definition" />
500+ <include syntax="self" collection="data-constructor" />
501+ <include syntax="self" collection="type" />
478502 </subscopes>
479503 </scope>
480504 </collection>
481505
482− <collection name="deriving-clause">
483− <scope name="haskell.record.construct.deriving.keyword">
484− <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
506+ <collection name="data-constructor">
507+ <scope name="haskell.identifier.type.struct.data.constructor">
508+ <expression>=\h+[A-Z](\w|')*</expression>
485509 </scope>
486− <scope name="haskell.record.construct.deriving.keyword">
487− <include syntax="self" collection="comments" />
488− <expression>via</expression>
510+ <scope name="haskell.identifier.type.struct.data.constructor">
511+ <expression>\|\h+[A-Z](\w|')*</expression>
489512 </scope>
490513 </collection>
491514
492515 <collection name="record-definition">
493516 <scope name="haskell.record">
494− <symbol>
495− <context behavior="subtree" foldable="true" />
496− </symbol>
497517 <starts-with>
498− <expression>(?=\{)</expression>
499− <capture number="0" name="haskell.record.bracket" />
518+ <expression>(\{)</expression>
519+ <capture number="1" name="haskell.record.bracket" />
500520 </starts-with>
501521 <ends-with>
502522 <expression>(\})</expression>
503523 <capture number="1" name="haskell.record.bracket" />
504524 </ends-with>
505525 <subscopes>
506− <include syntax="self" collection="comments" />
507526 <include syntax="self" collection="record-definition-field-name" />
508527 <include syntax="self" collection="type" />
509528 </subscopes>
@@ -512,65 +531,26 @@
512531
513532 <collection name="record-definition-field-name">
514533 <scope name="haskell.record.definition.property">
515− <symbol type="property" />
516− <expression>(((?![A-Z])\w(\w|')*)\h*::|(^|\{|,)\h*((?![A-Z])\w(\w|')*))</expression>
517− <capture number="5" name="haskell.record.definition.property.field.property.name" />
518− <capture number="2" name="haskell.record.definition.property.field.property.name" />
534+ <expression>\w(\w|')*\h*::</expression>
519535 </scope>
520536 </collection>
521537
522538 <collection name="type">
523− <scope name="haskell.keyword.construct.function-arrow">
524− <expression>-></expression>
525− </scope>
526− <scope name="haskell.keyword.construct.fat-arrow">
527− <expression>=></expression>
528− </scope>
529− <include syntax="self" collection="strings" />
530− <scope name="haskell.type.construct.tuple">
531− <starts-with>
532− <expression>\(</expression>
533− </starts-with>
534− <ends-with>
535− <expression>\)</expression>
536− </ends-with>
537− <subscopes>
538− <include syntax="self" collection="comments" />
539− <scope name="haskell.construct.type.typle.comma">
540− <expression>\,</expression>
541− </scope>
542− <include syntax="self" collection="type" />
543− </subscopes>
544− </scope>
545− <scope name="haskell.type.list">
546− <starts-with>
547− <expression>'?\[</expression>
548− </starts-with>
549− <ends-with>
550− <expression>\]</expression>
551− </ends-with>
552− <subscopes>
553− <include syntax="self" collection="comments" />
554− <include syntax="self" collection="type" />
555− </subscopes>
556− </scope>
557− <scope name="haskell.type.star">
558− <expression>\*</expression>
559− </scope>
560− <scope name="haskell.keyword.construct.type-annotation-operator">
561− <expression>::</expression>
562− </scope>
563539 <include syntax="self" collection="type-list" />
564− <scope>
565− <expression>(([A-Z](\w|')*\.)*)'*\!?([A-Z](\w|')*)</expression>
566− <capture number="1" name="haskell.identifier.package.module" />
567− <capture number="4" name="haskell.identifier.type" />
540+ <scope name="haskell.identifier.type">
541+ <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
568542 </scope>
569543 <scope name="haskell.keyword.construct.forall">
570544 <expression>forall</expression>
571545 </scope>
572546 <scope name="haskell.identifier.type.variable">
573− <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\w)*</expression>
547+ <expression>\w(\w|')*</expression>
548+ </scope>
549+ <scope name="haskell.keyword.construct.function-arrow">
550+ <expression>-></expression>
551+ </scope>
552+ <scope name="haskell.keyword.construct.fat-arrow">
553+ <expression>=></expression>
574554 </scope>
575555 </collection>
576556
@@ -585,7 +565,6 @@
585565 <template>^(?!\s+\1\S)(?!\s*$)</template>
586566 </ends-with>
587567 <subscopes>
588− <include syntax="self" collection="comments" />
589568 <scope name="haskell.keyword.construct.where">
590569 <expression>where</expression>
591570 </scope>
@@ -605,7 +584,6 @@
605584 <capture number="1" name="haskell.type-list.bracket" />
606585 </ends-with>
607586 <subscopes>
608− <include syntax="self" collection="comments" />
609587 <include syntax="self" collection="type" />
610588 </subscopes>
611589 </scope>
@@ -622,7 +600,6 @@
622600 <capture number="1" name="haskell.keyword.construct.lambda" />
623601 </ends-with>
624602 <subscopes>
625− <include syntax="self" collection="comments" />
626603 <include syntax="self" collection="pattern-match" />
627604 </subscopes>
628605 </scope>
@@ -636,6 +613,7 @@
636613
637614 <collection name="where-clause">
638615 <scope name="haskell.construct.where">
616+ <local scope="within-parent" />
639617 <starts-with>
640618 <expression>^(\h*)(where)</expression>
641619 <capture number="2" name="haskell.construct.keyword.where" />
@@ -644,7 +622,6 @@
644622 <template>^(?!\1\s*\S)(?!s*$)</template>
645623 </ends-with>
646624 <subscopes>
647− <include syntax="self" collection="comments" />
648625 <include syntax="self" collection="definition" />
649626 </subscopes>
650627 </scope>
@@ -653,9 +630,7 @@
653630
654631 <collection name="qvarid">
655632 <scope name="haskell.identifier.function">
656− <expression>(([A-Z](\w|')*\.)*)(\w(\w|')*)</expression>
657− <capture number="1" name="haskell.identifier.package.module" />
658− <capture number="4" name="haskell.identifier.type" />
633+ <expression>([A-Z](\w|')*\.)*\w(\w|')*</expression>
659634 </scope>
660635 </collection>
661636
@@ -684,12 +659,12 @@
684659
685660
686661 <collection name="strings">
687− <scope name="haskell.string.double-quoted" spell-check="true">
662+ <scope name="haskell.string.double-quoted">
688663 <starts-with>
689− <expression>"</expression>
664+ <expression>"</expression>
690665 </starts-with>
691666 <ends-with>
692− <expression>"</expression>
667+ <expression>"</expression>
693668 </ends-with>
694669 <subscopes>
695670 <scope name="haskell.string.escape-sequences">
@@ -712,11 +687,8 @@
712687
713688 <collection name="module">
714689 <scope name="haskell.definition.module.package">
715− <symbol type="package">
716− <context behavior="subtree" foldable="true" export-local="true" />
717− </symbol>
718690 <starts-with>
719− <expression>^(module)\s+((\w|\.)+)</expression>
691+ <expression>^(module)\s+(\w|\.)+</expression>
720692 <capture number="1" name="haskell.construct.keyword.module" />
721693 <capture number="2" name="haskell.definition.module.package" />
722694 </starts-with>
@@ -724,75 +696,32 @@
724696 <expression>(where)</expression>
725697 <capture number="1" name="haskell.construct.keyword.module" />
726698 </ends-with>
727− <subscopes>
728− <scope name="identifier.haskell.type">
729− <symbol type="expression" />
730− <symbol type="expression" />
731− <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
732− <capture number="1" name="identifier.type" />
733− </scope>
734− <scope name="identifier.variable">
735− <symbol type="expression" />
699+ <subscopes export-symbols="true">
700+ <scope name="identifier.constant">
736701 <expression>(\w|')+</expression>
737− <capture number="0" name="identifier.haskell.function" />
738702 </scope>
739703 </subscopes>
740704 </scope>
741705 </collection>
742706
743707 <collection name="import">
744− <scope name="haskell.construct.import">
745− <starts-with>
746− <expression>^(import)\s</expression>
747− <capture number="1" name="haskell.construct.keyword.import" />
748− </starts-with>
749− <ends-with>
750− <expression>(?=^\S)</expression>
751− </ends-with>
752− <subscopes>
753− <scope name="haskell.construct.qualified">
754− <symbol type="expression" />
755− <expression>qualified</expression>
756− <capture number="0" name="haskell.construct.keyword.qualified" />
757− </scope>
758−
759− <scope name="haskell.construct.hiding">
760− <symbol type="keyword">
761− <context behavior="subtree" />
762− </symbol>
763− <starts-with>
764− <expression>(hiding)\h*(?=\()</expression>
765− <capture number="1" name="haskell.construct.keyword.hiding" />
766− </starts-with>
767− <ends-with>
768− <expression>(?=\))</expression>
769− </ends-with>
770− <subscopes anchored="true">
771− <include syntax="self" collection="import-list" />
772− <symbol type="expression" />
773− </subscopes>
774− </scope>
775−
776− <scope name="haskell.construct.keyword.as">
777− <symbol type="package" />
778− <expression>as(\h+([A-Z]\w*))?</expression>
779− <capture number="2" name="haskell.package.qualified.name" />
780− </scope>
781− <scope name="haskell.identifier.module.package">
782− <symbol type="package" />
783− <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
784− <capture number="0" name="haskell.package.name" />
785− </scope>
786− <include syntax="self" collection="import-list" />
787− </subscopes>
708+ <scope name="haskell.construct.keyword.import">
709+ <expression>^import\s</expression>
710+ </scope>
711+ <scope name="haskell.construct.keyword.qualified">
712+ <expression>qualified</expression>
713+ </scope>
714+ <scope name="haskell.construct.keyword.as">
715+ <expression>as</expression>
716+ </scope>
717+ <scope name="haskell.identifier.module.package">
718+ <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
788719 </scope>
720+ <include syntax="self" collection="import-list" />
789721 </collection>
790722
791723 <collection name="import-list">
792724 <scope name="import-list">
793− <symbol>
794− <context behavior="subtree" export-local="true" />
795− </symbol>
796725 <starts-with>
797726 <expression>(\()</expression>
798727 <capture number="1" name="haskell.import-list.bracket" />
@@ -802,21 +731,20 @@
802731 <capture number="1" name="haskell.import-list.bracket" />
803732 </ends-with>
804733 <subscopes>
805− <scope name="haskell.identifier.struct">
806− <symbol type="expression" />
807− <symbol type="reference" scope="local" />
808− <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
809− <capture number="1" name="haskell.import-list.identifier.type.name" />
810− </scope>
811− <scope name="haskell.identifier.function">
812− <symbol type="reference" scope="local" />
813− <expression>(\w|')+</expression>
814− <capture number="0" name="haskell.import-list.function.name" />
734+ <scope name="identifier.decorator">
735+ <expression>([A-Z](\w|')*\.)*\w(\w|')*</expression>
815736 </scope>
816737 </subscopes>
817738 </scope>
818739 </collection>
819740
741+ <!-- <collection name="special">
742+ <scope>
743+ <expression>(;|,)</expression>
744+ </scope>
745+ </collection> -->
746+
747+
820748 <collection name="reservedop">
821749 <scope name="keyword.operator">
822750 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
@@ -824,11 +752,10 @@
824752 </collection>
825753
826754 <collection name="keywords">
827− <scope name="haskell.keyword.self">
755+ <scope name="haskell.keyword.modifier">
828756 <symbol type="keyword" />
829757 <strings>
830758 <string>do</string>
831− <string>mdo</string>
832759 <string>in</string>
833760 <string>infix</string>
834761 <string>infixl</string>
@@ -866,18 +793,20 @@
866793 <strings>
867794 <string>undefined</string>
868795 <string>_</string>
869− <string>@</string>
870796 </strings>
871797 </scope>
872798 </collection>
873799
874800 <collection name="comments">
875801 <scope name="haskell.comment.single" spell-check="true">
876− <symbol type="comment" />
877− <expression> --.*$</expression>
802+ <starts-with>
803+ <expression>--</expression>
804+ </starts-with>
805+ <ends-with>
806+ <expression>$</expression>
807+ </ends-with>
878808 </scope>
879809 <scope name="haskell.comment.block" spell-check="true">
880− <symbol type="comment" />
881810 <starts-with>
882811 <expression>{-</expression>
883812 </starts-with>