@@ -41,7 +41,7 @@
41 <indentation>
41 <indentation>
42 <increase>
42 <increase>
43 <expression>
43 <expression>
44− (case|class|do|let|where).*
44+ (case|class|do|let|where|=).*
45 </expression>
45 </expression>
46 </increase>
46 </increase>
47 <decrease>
47 <decrease>
@@ -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,52 +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" />
96− <!-- Needed for do binds -->
97− <!-- <include syntax="self" collection="pattern-match" /> -->
100− <collection name="pattern-match">
101− <include syntax="self" collection="literal" />
102− <include syntax="self" collection="tuple-match" />
103− <!-- <include syntax="self" collection="at-pattern" /> -->
104− <include syntax="self" collection="varid" />
105− <include syntax="self" collection="qconid" />
106− <include syntax="self" collection="record-match" />
107− <include syntax="self" collection="list-pattern" />
108− <include syntax="self" collection="view-pattern" />
111− <collection name="type-applications">
112− <scope name="type-applications">
114− <expression>(\s@)\(</expression>
115− <capture number="1" name="haskell.keyword.operator.typeapplication" />
118− <expression>)</expression>
121− <include syntax="self" collection="type" />
124− <scope name="type-applications-single">
125− <expression>(@)(\w+)</expression>
126− <capture number="1" name="haskell.keyword.operator.typeapplication" />
127− <capture number="2" name="haskell.identifier.type" />
129 </collection>
101 </collection>
131 <collection name="Quote">
103 <collection name="Quote">
@@ -164,8 +136,8 @@
164 <capture number="1" name="haskell.pattern.record.bracket" />
136 <capture number="1" name="haskell.pattern.record.bracket" />
165 </ends-with>
137 </ends-with>
166 <subscopes>
138 <subscopes>
167− <include syntax="self" collection="pattern-match" />
139+ <include syntax="self" collection="comments" />
168− <include syntax="self" collection="varid" />
140+ <include syntax="self" collection="expressions" />
169 <scope name="record-sep">
141 <scope name="record-sep">
170 <expression>=</expression>
142 <expression>=</expression>
@@ -187,6 +159,7 @@
187 <capture number="1" name="haskell.pattern.record.bracket" />
159 <capture number="1" name="haskell.pattern.record.bracket" />
188 </ends-with>
160 </ends-with>
189 <subscopes>
161 <subscopes>
162+ <include syntax="self" collection="comments" />
190 <scope name="haskell.pattern.record.wildcard">
163 <scope name="haskell.pattern.record.wildcard">
191 <expression>\.\.</expression>
164 <expression>\.\.</expression>
@@ -213,29 +186,12 @@
213 <capture number="1" name="haskell.list.bracket" />
186 <capture number="1" name="haskell.list.bracket" />
214 </ends-with>
187 </ends-with>
215 <subscopes>
188 <subscopes>
189+ <include syntax="self" collection="comments" />
216 <include syntax="self" collection="expressions" />
190 <include syntax="self" collection="expressions" />
217 </subscopes>
191 </subscopes>
219 </collection>
193 </collection>
221− <collection name="list-pattern">
222− <symbol type="expression" />
223− <scope name="haskell.pattern.list">
225− <expression>(\[)</expression>
226− <capture number="1" name="haskell.pattern.list.bracket" />
229− <expression>(\])</expression>
230− <capture number="1" name="haskell.pattern.list.bracket" />
233− <include syntax="self" collection="pattern-match" />
239 <collection name="view-pattern">
195 <collection name="view-pattern">
240 <scope name="haskell.pattern.view">
196 <scope name="haskell.pattern.view">
241 <symbol type="expression" />
197 <symbol type="expression" />
@@ -252,24 +208,7 @@
252 <scope name="haskell.pattern.view.operator.arrow">
208 <scope name="haskell.pattern.view.operator.arrow">
253 <expression>-></expression>
209 <expression>-></expression>
255− <include syntax="self" collection="pattern-match" />
211+ <include syntax="self" collection="expressions" />
260− <collection name="tuple-match">
261− <symbol type="expression" />
262− <scope name="haskell.pattern.tuple">
264− <expression>(\()</expression>
265− <capture number="1" name="haskell.pattern.tuple.bracket" />
268− <expression>(\))</expression>
269− <capture number="1" name="haskell.pattern.tuple.bracket" />
272− <include syntax="self" collection="pattern-match" />
273 </subscopes>
212 </subscopes>
275 </collection>
214 </collection>
@@ -285,49 +224,7 @@
285 <capture number="1" name="haskell.case.keyword.condition" />
224 <capture number="1" name="haskell.case.keyword.condition" />
286 </ends-with>
225 </ends-with>
287 <subscopes anchored="true">
226 <subscopes anchored="true">
288− <include syntax="self" collection="pattern-match" />
227+ <include syntax="self" collection="expressions" />
293− <collection name="case-match">
294− <scope name="case-match">
296− <expression>(?=((\h*)\S.*->($|\h)))</expression>
299− <expression>-></expression>
301− <subscopes anchored="true">
302− <include syntax="self" collection="pattern-match" />
307− <collection name="inner-case-expressions">
308− <scope name="inner-case-expressions">
310− <expression>(?=((\h*)\S.*->($|\h)))</expression>
313− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
316− <include syntax="self" collection="case-match" />
317− <include syntax="self" collection="expressions"/>
322− <collection name="outer-case-expression">
323− <scope name="outer-case-expression">
325− <expression>(?=case)</expression>
328− <subscopes anchored="true" skip-whitespace="false">
329− <include syntax="self" collection="case-expression" />
330− <include syntax="self" collection="inner-case-expressions" repeat="true" />
331 </subscopes>
228 </subscopes>
333 </collection>
230 </collection>
@@ -344,136 +241,144 @@
344 <capture number="1" name="haskell.tuple.bracket" />
241 <capture number="1" name="haskell.tuple.bracket" />
345 </ends-with>
242 </ends-with>
346 <subscopes>
243 <subscopes>
244+ <include syntax="self" collection="comments" />
347 <include syntax="self" collection="expressions" />
245 <include syntax="self" collection="expressions" />
348 </subscopes>
246 </subscopes>
350 </collection>
248 </collection>
352 <collection name="typeclass">
250 <collection name="typeclass">
353− <symbol type="interface" />
251+ <scope name="haskell.definition.class.head">
354− <scope name="haskell.definition.class">
252+ <symbol type="class" scope="global" name-selector="haskell.keyword.construct.class.name">
253+ <context behavior="whitespace" foldable="true" />
355 <starts-with>
255 <starts-with>
356 <expression>^(\h*)(class)($|\h)</expression>
256 <expression>^(\h*)(class)($|\h)</expression>
357 <capture number="2" name="haskell.keyword.construct.class" />
257 <capture number="2" name="haskell.keyword.construct.class" />
358 </starts-with>
258 </starts-with>
359− <ends-with>
259+ <ends-with />
360− <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>
361− </ends-with>
267+ </ends-with>
362− <subscopes>
268+ <subscopes>
269+ <include syntax="self" collection="comments" />
270+ <include syntax="self" collection="type" />
363− <scope name="haskell.keyword.construct.where">
273+ <scope name="haskell.keyword.construct.where" optional="true">
364 <expression>where</expression>
274 <expression>where</expression>
366− <include syntax="self" collection="type" />
367− <include syntax="self" collection="type-definition" />
368− <!-- <include syntax="self" collection="type-annotation" /> -->
369− <include syntax="self" collection="definition" />
370 </subscopes>
276 </subscopes>
372 </collection>
278 </collection>
374 <collection name="instance">
280 <collection name="instance">
375 <scope name="haskell.instance">
281 <scope name="haskell.instance">
376− <symbol type="category" />
282+ <symbol type="category" name-selector="haskell.keyword.construct.instance.name">
283+ <context behavior="whitespace" foldable="true" />
377 <starts-with>
285 <starts-with>
378 <expression>^(\h*)(instance)($|\h)</expression>
286 <expression>^(\h*)(instance)($|\h)</expression>
379 <capture number="2" name="haskell.keyword.construct.instance" />
287 <capture number="2" name="haskell.keyword.construct.instance" />
380 </starts-with>
288 </starts-with>
381− <ends-with>
289+ <ends-with />
382− <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>
383− </ends-with>
297+ </ends-with>
384− <subscopes>
298+ <subscopes>
299+ <include syntax="self" collection="type" />
385− <scope name="haskell.keyword.construct.where">
302+ <scope name="haskell.keyword.construct.where" optional="true">
386 <expression>where</expression>
303 <expression>where</expression>
388− <include syntax="self" collection="type" />
389− <include syntax="self" collection="type-definition" />
390− <include syntax="self" collection="type-annotation" />
391− <include syntax="self" collection="definition" />
392 </subscopes>
305 </subscopes>
394 </collection>
307 </collection>
396 <collection name="type-family-definition">
309 <collection name="type-family-definition">
397− <scope name="haskell.definition.type.type-family">
310+ <scope name="haskell.definition.type-family.type">
398− <symbol type="type" />
399 <starts-with>
311 <starts-with>
400− <expression>^(\h*)(type\h+family)\h+`?(\w(\w|')*)`?($|\h)</expression>
312+ <expression>^(\h*)(type\h+family)</expression>
401 <capture number="2" name="haskell.keyword.construct.type-family" />
313 <capture number="2" name="haskell.keyword.construct.type-family" />
402 </starts-with>
314 </starts-with>
403 <ends-with>
315 <ends-with>
404 <template>^(?!\s+\1\S)(?!\s*$)</template>
316 <template>^(?!\s+\1\S)(?!\s*$)</template>
405 </ends-with>
317 </ends-with>
406− <subscopes>
318+ <subscopes anchored="true" skip-whitespace="false">
319+ <scope name="haskell.type-family.head">
321+ <expression></expression>
324+ <expression>where</expression>
407− <scope name="haskell.keyword.construct.where">
325+ <capture number="0" name="haskell.keyword.construct.where" />
327+ <subscopes anchored="true">
328+ <scope name="haskell.identifier.type-family.type.name">
408− <expression>where</expression>
329+ <expression>\S+</expression>
331+ <include syntax="self" collection="type" repeat="true" optional="true" />
410− <include syntax="self" collection="type" />
415− <collection name="definition">
416− <scope name="haskell.definition.type.function">
417− <symbol type="function">
419− <component selector="haskell.definition.type.function" />
424− <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
425− <capture number="2" name="haskell.keyword.construct.default" />
426− <capture number="3" name="haskell.identifier.function" />
429− <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
432− <include syntax="self" collection="type-annotation" />
335+ <include syntax="self" collection="type-family-case-definition" optional="true" repeat="true" />
433− <include syntax="self" collection="implementation" />
434 </subscopes>
336 </subscopes>
436 </collection>
338 </collection>
438− <collection name="do-bind">
340+ <collection name="type-family-case-definition">
439− <scope name="do-bind">
341+ <scope name="haskell.definition.type-family.type.case">
440 <starts-with>
342 <starts-with>
441− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
343+ <expression>^(\h*)(?=\S)</expression>
442 </starts-with>
344 </starts-with>
443 <ends-with>
345 <ends-with>
444− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
346+ <template>^(?!\s+\1\S)(?!\s*$)</template>
445 </ends-with>
347 </ends-with>
446 <subscopes>
348 <subscopes>
447− <include syntax="self" collection="do-pattern" />
349+ <include syntax="self" collection="comments" />
448− <include syntax="self" collection="expressions" />
350+ <include syntax="self" collection="type" optional="true" repeat="true" />
449− <!-- <scope name="bind-arrow">
351+ <scope>
450− <expression><-</expression>
352+ <expression>=</expression>
451− </scope> -->
353+ </scope>
354+ <include syntax="self" collection="type" optional="true" repeat="true" />
452 </subscopes>
355 </subscopes>
454 </collection>
357 </collection>
456− <collection name="do-pattern">
359+ <collection name="definition">
457− <scope name="do-pattern">
360+ <scope name="haskell.definition.type.function">
361+ <symbol type="function">
362+ <context behavior="whitespace" foldable="true" />
458 <starts-with>
364 <starts-with>
459− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
365+ <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
366+ <capture number="2" name="haskell.keyword.construct.default" />
367+ <capture number="3" name="haskell.identifier.function.name" />
460 </starts-with>
368 </starts-with>
461 <ends-with>
369 <ends-with>
462− <expression><-</expression>
370+ <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
463 </ends-with>
371 </ends-with>
464 <subscopes>
372 <subscopes>
465− <include syntax="self" collection="pattern-match" />
373+ <include syntax="self" collection="comments" />
466− <!-- <scope name="bind-arrow">
374+ <include syntax="self" collection="type-annotation" />
467− <expression><-</expression>
469− <include syntax="self" collection="expressions" repeat="true" /> -->
375+ <include syntax="self" collection="implementation" />
470 </subscopes>
376 </subscopes>
472 </collection>
378 </collection>
474 <collection name="implementation">
380 <collection name="implementation">
475− <scope name="haskell.definition.type.function">
381+ <scope name="haskell.definition.type.function.implementation">
476− <local scope="within-construct" />
477 <starts-with>
382 <starts-with>
478 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
383 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
479 <capture number="2" name="haskell.keyword.construct.default" />
384 <capture number="2" name="haskell.keyword.construct.default" />
@@ -483,14 +388,20 @@
483 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
388 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
484 </ends-with>
389 </ends-with>
485 <subscopes>
390 <subscopes>
486− <include syntax="self" collection="where-clause" />
391+ <include syntax="self" collection="comments" />
487− <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" />
488 </subscopes>
399 </subscopes>
490 </collection>
401 </collection>
492 <collection name="type-annotation">
403 <collection name="type-annotation">
493− <scope name="haskell.definition.type.function">
404+ <scope name="haskell.definition.type.function.type-signature">
494 <starts-with>
405 <starts-with>
495 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
406 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
496 <capture number="2" name="haskell.identifier.function" />
407 <capture number="2" name="haskell.identifier.function" />
@@ -499,6 +410,7 @@
499 <template>^(?!\s+\1\S)(?!\s*$)</template>
410 <template>^(?!\s+\1\S)(?!\s*$)</template>
500 </ends-with>
411 </ends-with>
501 <subscopes>
412 <subscopes>
413+ <include syntax="self" collection="comments" />
502 <include syntax="self" collection="type" />
414 <include syntax="self" collection="type" />
503 </subscopes>
415 </subscopes>
@@ -506,15 +418,19 @@
507 <collection name="type-definition">
419 <collection name="type-definition">
508 <scope name="haskell.definition.type">
420 <scope name="haskell.definition.type">
421+ <symbol type="type" scope="global">
422+ <context behavior="whitespace" foldable="true" />
509 <starts-with>
424 <starts-with>
510 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
425 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
511 <capture number="2" name="haskell.keyword.construct.type" />
426 <capture number="2" name="haskell.keyword.construct.type" />
512− <capture number="3" name="haskell.identifier.type" />
427+ <capture number="3" name="haskell.identifier.type.name" />
513 </starts-with>
428 </starts-with>
514 <ends-with>
429 <ends-with>
515 <template>^(?!\s+\1\S)(?!\s*$)</template>
430 <template>^(?!\s+\1\S)(?!\s*$)</template>
516 </ends-with>
431 </ends-with>
517 <subscopes>
432 <subscopes>
433+ <include syntax="self" collection="comments" />
518 <include syntax="self" collection="type" />
434 <include syntax="self" collection="type" />
519 </subscopes>
435 </subscopes>
@@ -522,66 +438,72 @@
523 <collection name="GADT-definition">
439 <collection name="GADT-definition">
524 <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" />
525 <starts-with>
444 <starts-with>
526− <expression>^(\h*)(data)\h+(\w(\w|')*)</expression>
445+ <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
527 <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" />
528 </starts-with>
448 </starts-with>
529 <ends-with>
449 <ends-with>
530 <template>^(?!\s+\1\S)(?!\s*$)</template>
450 <template>^(?!\s+\1\S)(?!\s*$)</template>
531 </ends-with>
451 </ends-with>
532 <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" />
533 <include syntax="self" collection="gadt-constructor" />
460 <include syntax="self" collection="gadt-constructor" />
534 <include syntax="self" collection="type" />
461 <include syntax="self" collection="type" />
535− <include syntax="self" collection="record-definition" />
536− <include syntax="self" collection="record-definition-field-name" />
537 </subscopes>
462 </subscopes>
539 </collection>
464 </collection>
541 <collection name="gadt-constructor">
466 <collection name="gadt-constructor">
542− <scope name="identifier.type.struct.GADT.constructor">
467+ <scope name="haskell.identifier.type.struct.data.constructor">
543− <expression>^\h+[A-Z](\w|')*</expression>
468+ <symbol type="constructor">
544− </scope>
469+ <context behavior="subtree" foldable="true" />
545− </collection>
470+ </symbol>
547− <collection name="data-definition">
548− <scope name="haskell.definition.struct.data">
549 <starts-with>
471 <starts-with>
550− <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
472+ <expression>(^|=|\||^)\h+([A-Z](\w|')*)</expression>
551− <capture number="2" name="haskell.keyword.construct.data.newtype" />
473+ <capture number="2" name="haskell.identifier.data.name" />
552− <capture number="3" name="haskell.identifier.type" />
553 </starts-with>
474 </starts-with>
554− <ends-with>
475+ <ends-with />
555− <template>^(?!\s+\1\S)(?!\s*$)</template>
557− <subscopes>
476+ <subscopes anchored="true">
558 <include syntax="self" collection="record-definition" />
477 <include syntax="self" collection="record-definition" />
559− <include syntax="self" collection="data-constructor" />
560− <include syntax="self" collection="type" />
561 </subscopes>
478 </subscopes>
563 </collection>
480 </collection>
565− <collection name="data-constructor">
482+ <collection name="deriving-clause">
566− <scope name="haskell.identifier.type.struct.data.constructor">
483+ <scope name="haskell.record.construct.deriving.keyword">
567− <expression>=\h+[A-Z](\w|')*</expression>
484+ <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
569− <scope name="haskell.identifier.type.struct.data.constructor">
486+ <scope name="haskell.record.construct.deriving.keyword">
487+ <include syntax="self" collection="comments" />
570− <expression>\|\h+[A-Z](\w|')*</expression>
488+ <expression>via</expression>
572 </collection>
490 </collection>
574 <collection name="record-definition">
492 <collection name="record-definition">
575 <scope name="haskell.record">
493 <scope name="haskell.record">
495+ <context behavior="subtree" foldable="true" />
576 <starts-with>
497 <starts-with>
577− <expression>(\{)</expression>
498+ <expression>(?=\{)</expression>
578− <capture number="1" name="haskell.record.bracket" />
499+ <capture number="0" name="haskell.record.bracket" />
579 </starts-with>
500 </starts-with>
580 <ends-with>
501 <ends-with>
581 <expression>(\})</expression>
502 <expression>(\})</expression>
582 <capture number="1" name="haskell.record.bracket" />
503 <capture number="1" name="haskell.record.bracket" />
583 </ends-with>
504 </ends-with>
584 <subscopes>
505 <subscopes>
506+ <include syntax="self" collection="comments" />
585 <include syntax="self" collection="record-definition-field-name" />
507 <include syntax="self" collection="record-definition-field-name" />
586 <include syntax="self" collection="type" />
508 <include syntax="self" collection="type" />
587 </subscopes>
509 </subscopes>
@@ -590,26 +512,65 @@
591 <collection name="record-definition-field-name">
513 <collection name="record-definition-field-name">
592 <scope name="haskell.record.definition.property">
514 <scope name="haskell.record.definition.property">
515+ <symbol type="property" />
593− <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" />
595 </collection>
520 </collection>
597 <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" />
530+ <scope name="haskell.type.construct.tuple">
532+ <expression>\(</expression>
535+ <expression>\)</expression>
538+ <include syntax="self" collection="comments" />
539+ <scope name="haskell.construct.type.typle.comma">
540+ <expression>\,</expression>
542+ <include syntax="self" collection="type" />
545+ <scope name="haskell.type.list">
547+ <expression>'?\[</expression>
550+ <expression>\]</expression>
553+ <include syntax="self" collection="comments" />
554+ <include syntax="self" collection="type" />
557+ <scope name="haskell.type.star">
558+ <expression>\*</expression>
560+ <scope name="haskell.keyword.construct.type-annotation-operator">
561+ <expression>::</expression>
598 <include syntax="self" collection="type-list" />
563 <include syntax="self" collection="type-list" />
565+ <expression>(([A-Z](\w|')*\.)*)'*\!?([A-Z](\w|')*)</expression>
566+ <capture number="1" name="haskell.identifier.package.module" />
599− <scope name="haskell.identifier.type">
567+ <capture number="4" name="haskell.identifier.type" />
600− <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
602 <scope name="haskell.keyword.construct.forall">
569 <scope name="haskell.keyword.construct.forall">
603 <expression>forall</expression>
570 <expression>forall</expression>
605 <scope name="haskell.identifier.type.variable">
572 <scope name="haskell.identifier.type.variable">
606− <expression>\w(\w|')*</expression>
573+ <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\w)*</expression>
608− <scope name="haskell.keyword.construct.function-arrow">
609− <expression>-></expression>
611− <scope name="haskell.keyword.construct.fat-arrow">
612− <expression>=></expression>
614 </collection>
575 </collection>
@@ -624,6 +585,7 @@
624 <template>^(?!\s+\1\S)(?!\s*$)</template>
585 <template>^(?!\s+\1\S)(?!\s*$)</template>
625 </ends-with>
586 </ends-with>
626 <subscopes>
587 <subscopes>
588+ <include syntax="self" collection="comments" />
627 <scope name="haskell.keyword.construct.where">
589 <scope name="haskell.keyword.construct.where">
628 <expression>where</expression>
590 <expression>where</expression>
@@ -643,6 +605,7 @@
643 <capture number="1" name="haskell.type-list.bracket" />
605 <capture number="1" name="haskell.type-list.bracket" />
644 </ends-with>
606 </ends-with>
645 <subscopes>
607 <subscopes>
608+ <include syntax="self" collection="comments" />
646 <include syntax="self" collection="type" />
609 <include syntax="self" collection="type" />
647 </subscopes>
610 </subscopes>
@@ -659,6 +622,7 @@
659 <capture number="1" name="haskell.keyword.construct.lambda" />
622 <capture number="1" name="haskell.keyword.construct.lambda" />
660 </ends-with>
623 </ends-with>
661 <subscopes>
624 <subscopes>
625+ <include syntax="self" collection="comments" />
662 <include syntax="self" collection="pattern-match" />
626 <include syntax="self" collection="pattern-match" />
663 </subscopes>
627 </subscopes>
@@ -672,7 +636,6 @@
673 <collection name="where-clause">
637 <collection name="where-clause">
674 <scope name="haskell.construct.where">
638 <scope name="haskell.construct.where">
675− <local scope="within-parent" />
676 <starts-with>
639 <starts-with>
677 <expression>^(\h*)(where)</expression>
640 <expression>^(\h*)(where)</expression>
678 <capture number="2" name="haskell.construct.keyword.where" />
641 <capture number="2" name="haskell.construct.keyword.where" />
@@ -681,6 +644,7 @@
681 <template>^(?!\1\s*\S)(?!s*$)</template>
644 <template>^(?!\1\s*\S)(?!s*$)</template>
682 </ends-with>
645 </ends-with>
683 <subscopes>
646 <subscopes>
647+ <include syntax="self" collection="comments" />
684 <include syntax="self" collection="definition" />
648 <include syntax="self" collection="definition" />
685 </subscopes>
649 </subscopes>
@@ -689,7 +653,9 @@
690 <collection name="qvarid">
654 <collection name="qvarid">
691 <scope name="haskell.identifier.function">
655 <scope name="haskell.identifier.function">
692− <expression>([A-Z](\w|')*\.)*\w(\w|')*</expression>
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" />
694 </collection>
660 </collection>
@@ -718,12 +684,12 @@
720 <collection name="strings">
686 <collection name="strings">
721− <scope name="haskell.string.double-quoted">
687+ <scope name="haskell.string.double-quoted" spell-check="true">
722 <starts-with>
688 <starts-with>
723− <expression>"</expression>
689+ <expression>"</expression>
724 </starts-with>
690 </starts-with>
725 <ends-with>
691 <ends-with>
726− <expression>"</expression>
692+ <expression>"</expression>
727 </ends-with>
693 </ends-with>
728 <subscopes>
694 <subscopes>
729 <scope name="haskell.string.escape-sequences">
695 <scope name="haskell.string.escape-sequences">
@@ -746,8 +712,11 @@
747 <collection name="module">
713 <collection name="module">
748 <scope name="haskell.definition.module.package">
714 <scope name="haskell.definition.module.package">
715+ <symbol type="package">
716+ <context behavior="subtree" foldable="true" export-local="true" />
749 <starts-with>
718 <starts-with>
750− <expression>^(module)\s+(\w|\.)+</expression>
719+ <expression>^(module)\s+((\w|\.)+)</expression>
751 <capture number="1" name="haskell.construct.keyword.module" />
720 <capture number="1" name="haskell.construct.keyword.module" />
752 <capture number="2" name="haskell.definition.module.package" />
721 <capture number="2" name="haskell.definition.module.package" />
753 </starts-with>
722 </starts-with>
@@ -755,32 +724,75 @@
755 <expression>(where)</expression>
724 <expression>(where)</expression>
756 <capture number="1" name="haskell.construct.keyword.module" />
725 <capture number="1" name="haskell.construct.keyword.module" />
757 </ends-with>
726 </ends-with>
758− <subscopes export-symbols="true">
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" />
759− <scope name="identifier.constant">
734+ <scope name="identifier.variable">
735+ <symbol type="expression" />
760 <expression>(\w|')+</expression>
736 <expression>(\w|')+</expression>
737+ <capture number="0" name="identifier.haskell.function" />
762 </subscopes>
739 </subscopes>
764 </collection>
741 </collection>
766 <collection name="import">
743 <collection name="import">
767− <scope name="haskell.construct.keyword.import">
744+ <scope name="haskell.construct.import">
768− <expression>^import\s</expression>
746+ <expression>^(import)\s</expression>
769− </scope>
747+ <capture number="1" name="haskell.construct.keyword.import" />
750+ <expression>(?=^\S)</expression>
753+ <scope name="haskell.construct.qualified">
754+ <symbol type="expression" />
755+ <expression>qualified</expression>
770− <scope name="haskell.construct.keyword.qualified">
756+ <capture number="0" name="haskell.construct.keyword.qualified" />
759+ <scope name="haskell.construct.hiding">
760+ <symbol type="keyword">
761+ <context behavior="subtree" />
771− <expression>qualified</expression>
764+ <expression>(hiding)\h*(?=\()</expression>
765+ <capture number="1" name="haskell.construct.keyword.hiding" />
768+ <expression>(?=\))</expression>
770+ <subscopes anchored="true">
771+ <include syntax="self" collection="import-list" />
772+ <symbol type="expression" />
772− </scope>
774+ </scope>
773− <scope name="haskell.construct.keyword.as">
776+ <scope name="haskell.construct.keyword.as">
777+ <symbol type="package" />
774− <expression>as</expression>
778+ <expression>as(\h+([A-Z]\w*))?</expression>
779+ <capture number="2" name="haskell.package.qualified.name" />
775− </scope>
780+ </scope>
776− <scope name="haskell.identifier.module.package">
781+ <scope name="haskell.identifier.module.package">
782+ <symbol type="package" />
777− <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
783+ <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
784+ <capture number="0" name="haskell.package.name" />
786+ <include syntax="self" collection="import-list" />
779− <include syntax="self" collection="import-list" />
780 </collection>
789 </collection>
782 <collection name="import-list">
791 <collection name="import-list">
783 <scope name="import-list">
792 <scope name="import-list">
794+ <context behavior="subtree" export-local="true" />
784 <starts-with>
796 <starts-with>
785 <expression>(\()</expression>
797 <expression>(\()</expression>
786 <capture number="1" name="haskell.import-list.bracket" />
798 <capture number="1" name="haskell.import-list.bracket" />
@@ -790,20 +802,21 @@
790 <capture number="1" name="haskell.import-list.bracket" />
802 <capture number="1" name="haskell.import-list.bracket" />
791 </ends-with>
803 </ends-with>
792 <subscopes>
804 <subscopes>
793− <scope name="identifier.decorator">
805+ <scope name="haskell.identifier.struct">
806+ <symbol type="expression" />
807+ <symbol type="reference" scope="local" />
794− <expression>([A-Z](\w|')*\.)*\w(\w|')*</expression>
808+ <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
809+ <capture number="1" name="haskell.import-list.identifier.type.name" />
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" />
796 </subscopes>
816 </subscopes>
798 </collection>
818 </collection>
800− <!-- <collection name="special">
802− <expression>(;|,)</expression>
807 <collection name="reservedop">
820 <collection name="reservedop">
808 <scope name="keyword.operator">
821 <scope name="keyword.operator">
809 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
822 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
@@ -811,10 +824,11 @@
811 </collection>
824 </collection>
813 <collection name="keywords">
826 <collection name="keywords">
814− <scope name="haskell.keyword.modifier">
827+ <scope name="haskell.keyword.self">
815 <symbol type="keyword" />
828 <symbol type="keyword" />
816 <strings>
829 <strings>
817 <string>do</string>
830 <string>do</string>
831+ <string>mdo</string>
818 <string>in</string>
832 <string>in</string>
819 <string>infix</string>
833 <string>infix</string>
820 <string>infixl</string>
834 <string>infixl</string>
@@ -852,20 +866,18 @@
852 <strings>
866 <strings>
853 <string>undefined</string>
867 <string>undefined</string>
854 <string>_</string>
868 <string>_</string>
855 </strings>
870 </strings>
857 </collection>
872 </collection>
859 <collection name="comments">
874 <collection name="comments">
860 <scope name="haskell.comment.single" spell-check="true">
875 <scope name="haskell.comment.single" spell-check="true">
861− <starts-with>
876+ <symbol type="comment" />
862− <expression>--</expression>
865− <expression>$</expression>
877+ <expression> --.*$</expression>
868 <scope name="haskell.comment.block" spell-check="true">
879 <scope name="haskell.comment.block" spell-check="true">
880+ <symbol type="comment" />
869 <starts-with>
881 <starts-with>
870 <expression>{-</expression>
882 <expression>{-</expression>
871 </starts-with>
883 </starts-with>