@@ -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,6 +57,8 @@
57 <include syntax="self" collection="type-family-definition" />
57 <include syntax="self" collection="type-family-definition" />
58 <include syntax="self" collection="pattern-definition" />
58 <include syntax="self" collection="pattern-definition" />
59 <include syntax="self" collection="type-definition" />
59 <include syntax="self" collection="type-definition" />
60+ <!-- <include syntax="self" collection="type-annotation" /> -->
61+ <include syntax="self" collection="data-definition" />
60 <include syntax="self" collection="GADT-definition" />
62 <include syntax="self" collection="GADT-definition" />
61 <include syntax="self" collection="instance" />
63 <include syntax="self" collection="instance" />
62 <include syntax="self" collection="typeclass" />
64 <include syntax="self" collection="typeclass" />
@@ -65,6 +67,7 @@
66 <template-scopes>
68 <template-scopes>
67 <include syntax="self" collection="Quote" />
69 <include syntax="self" collection="Quote" />
70+ <include syntax="self" collection="comments" />
68 </template-scopes>
71 </template-scopes>
70 <collections>
73 <collections>
@@ -77,27 +80,53 @@
77 </collection>
80 </collection>
79 <collection name="expressions">
82 <collection name="expressions">
80− <scope name="haskell.construct.keyword.at">
81− <expression>@</expression>
83− <scope name="haskell.construct.keyword.case-arrow">
84− <expression>-></expression>
86− <scope name="haskell.construct.keyword.bind-arrow">
87− <expression><-</expression>
89− <include syntax="self" collection="keywords" />
83+ <include syntax="self" collection="do-bind" />
90 <include syntax="self" collection="literal" />
84 <include syntax="self" collection="literal" />
91 <include syntax="self" collection="operators" />
85 <include syntax="self" collection="operators" />
92− <include syntax="self" collection="record-match" />
93 <include syntax="self" collection="list" />
86 <include syntax="self" collection="list" />
94− <include syntax="self" collection="view-pattern" />
95 <include syntax="self" collection="lambda-case" />
87 <include syntax="self" collection="lambda-case" />
96 <include syntax="self" collection="lambda-head" />
88 <include syntax="self" collection="lambda-head" />
89+ <include syntax="self" collection="type-applications" />
97 <include syntax="self" collection="case-expression" />
90 <include syntax="self" collection="case-expression" />
98− <include syntax="self" collection="qconid" />
99 <include syntax="self" collection="qvarid" />
91 <include syntax="self" collection="qvarid" />
92+ <include syntax="self" collection="bind-arrow" />
100 <include syntax="self" collection="tuple" />
93 <include syntax="self" collection="tuple" />
97+ <!-- Needed for do binds -->
98+ <!-- <include syntax="self" collection="pattern-match" /> -->
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" />
112+ <collection name="type-applications">
113+ <scope name="type-applications">
115+ <expression>(\s@)\(</expression>
116+ <capture number="1" name="haskell.keyword.operator.typeapplication" />
119+ <expression>)</expression>
122+ <include syntax="self" collection="type" />
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" />
101 </collection>
130 </collection>
103 <collection name="Quote">
132 <collection name="Quote">
@@ -136,8 +165,8 @@
136 <capture number="1" name="haskell.pattern.record.bracket" />
165 <capture number="1" name="haskell.pattern.record.bracket" />
137 </ends-with>
166 </ends-with>
138 <subscopes>
167 <subscopes>
139− <include syntax="self" collection="comments" />
168+ <include syntax="self" collection="pattern-match" />
140− <include syntax="self" collection="expressions" />
169+ <include syntax="self" collection="varid" />
141 <scope name="record-sep">
170 <scope name="record-sep">
142 <expression>=</expression>
171 <expression>=</expression>
@@ -159,7 +188,6 @@
159 <capture number="1" name="haskell.pattern.record.bracket" />
188 <capture number="1" name="haskell.pattern.record.bracket" />
160 </ends-with>
189 </ends-with>
161 <subscopes>
190 <subscopes>
162− <include syntax="self" collection="comments" />
163 <scope name="haskell.pattern.record.wildcard">
191 <scope name="haskell.pattern.record.wildcard">
164 <expression>\.\.</expression>
192 <expression>\.\.</expression>
@@ -186,12 +214,29 @@
186 <capture number="1" name="haskell.list.bracket" />
214 <capture number="1" name="haskell.list.bracket" />
187 </ends-with>
215 </ends-with>
188 <subscopes>
216 <subscopes>
189− <include syntax="self" collection="comments" />
190 <include syntax="self" collection="expressions" />
217 <include syntax="self" collection="expressions" />
191 </subscopes>
218 </subscopes>
193 </collection>
220 </collection>
222+ <collection name="list-pattern">
223+ <symbol type="expression" />
224+ <scope name="haskell.pattern.list">
226+ <expression>(\[)</expression>
227+ <capture number="1" name="haskell.pattern.list.bracket" />
230+ <expression>(\])</expression>
231+ <capture number="1" name="haskell.pattern.list.bracket" />
234+ <include syntax="self" collection="pattern-match" />
195 <collection name="view-pattern">
240 <collection name="view-pattern">
196 <scope name="haskell.pattern.view">
241 <scope name="haskell.pattern.view">
197 <symbol type="expression" />
242 <symbol type="expression" />
@@ -208,7 +253,24 @@
208 <scope name="haskell.pattern.view.operator.arrow">
253 <scope name="haskell.pattern.view.operator.arrow">
209 <expression>-></expression>
254 <expression>-></expression>
211− <include syntax="self" collection="expressions" />
256+ <include syntax="self" collection="pattern-match" />
261+ <collection name="tuple-match">
262+ <symbol type="expression" />
263+ <scope name="haskell.pattern.tuple">
265+ <expression>(\()</expression>
266+ <capture number="1" name="haskell.pattern.tuple.bracket" />
269+ <expression>(\))</expression>
270+ <capture number="1" name="haskell.pattern.tuple.bracket" />
273+ <include syntax="self" collection="pattern-match" />
212 </subscopes>
274 </subscopes>
214 </collection>
276 </collection>
@@ -223,7 +285,7 @@
223 <expression>(of)</expression>
285 <expression>(of)</expression>
224 <capture number="1" name="haskell.case.keyword.condition" />
286 <capture number="1" name="haskell.case.keyword.condition" />
225 </ends-with>
287 </ends-with>
226− <subscopes anchored="true">
288+ <subscopes>
227 <include syntax="self" collection="expressions" />
289 <include syntax="self" collection="expressions" />
228 </subscopes>
290 </subscopes>
@@ -241,117 +303,70 @@
241 <capture number="1" name="haskell.tuple.bracket" />
303 <capture number="1" name="haskell.tuple.bracket" />
242 </ends-with>
304 </ends-with>
243 <subscopes>
305 <subscopes>
244− <include syntax="self" collection="comments" />
245 <include syntax="self" collection="expressions" />
306 <include syntax="self" collection="expressions" />
246 </subscopes>
307 </subscopes>
248 </collection>
309 </collection>
250 <collection name="typeclass">
311 <collection name="typeclass">
251− <scope name="haskell.definition.class.head">
312+ <symbol type="interface" />
252− <symbol type="class" scope="global" name-selector="haskell.keyword.construct.class.name">
313+ <scope name="haskell.definition.class">
253− <context behavior="whitespace" foldable="true" />
255 <starts-with>
314 <starts-with>
256 <expression>^(\h*)(class)($|\h)</expression>
315 <expression>^(\h*)(class)($|\h)</expression>
257 <capture number="2" name="haskell.keyword.construct.class" />
316 <capture number="2" name="haskell.keyword.construct.class" />
258 </starts-with>
317 </starts-with>
259− <ends-with />
318+ <ends-with>
260− <subscopes anchored="true">
319+ <template>^(?!\s+\1\S)(?!\s*$)</template>
261− <scope name="haskell.keyword.construct.class.name">
263− <expression></expression>
266− <expression>(?=(where|^\s*$))</expression>
267− </ends-with>
320+ </ends-with>
268− <subscopes>
321+ <subscopes>
269− <include syntax="self" collection="comments" />
270− <include syntax="self" collection="type" />
273− <scope name="haskell.keyword.construct.where" optional="true">
322+ <scope name="haskell.keyword.construct.where">
274 <expression>where</expression>
323 <expression>where</expression>
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" />
276 </subscopes>
329 </subscopes>
278 </collection>
331 </collection>
280 <collection name="instance">
333 <collection name="instance">
281 <scope name="haskell.instance">
334 <scope name="haskell.instance">
282− <symbol type="category" name-selector="haskell.keyword.construct.instance.name">
335+ <symbol type="category" />
283− <context behavior="whitespace" foldable="true" />
285 <starts-with>
336 <starts-with>
286 <expression>^(\h*)(instance)($|\h)</expression>
337 <expression>^(\h*)(instance)($|\h)</expression>
287 <capture number="2" name="haskell.keyword.construct.instance" />
338 <capture number="2" name="haskell.keyword.construct.instance" />
288 </starts-with>
339 </starts-with>
290− <subscopes anchored="true">
291− <scope name="haskell.keyword.construct.instance.name">
293− <expression></expression>
296− <expression>(?=(where|^\s*$))</expression>
299− <include syntax="self" collection="type" />
302− <scope name="haskell.keyword.construct.where" optional="true">
303− <expression>where</expression>
309− <collection name="type-family-definition">
310− <scope name="haskell.definition.type-family.type">
312− <expression>^(\h*)(type\h+family)</expression>
313− <capture number="2" name="haskell.keyword.construct.type-family" />
315 <ends-with>
340 <ends-with>
316 <template>^(?!\s+\1\S)(?!\s*$)</template>
341 <template>^(?!\s+\1\S)(?!\s*$)</template>
317 </ends-with>
342 </ends-with>
318− <subscopes anchored="true" skip-whitespace="false">
343+ <subscopes>
319− <scope name="haskell.type-family.head">
321− <expression></expression>
324− <expression>where</expression>
325− <capture number="0" name="haskell.keyword.construct.where" />
344+ <scope name="haskell.keyword.construct.where">
327− <subscopes anchored="true">
328− <scope name="haskell.identifier.type-family.type.name">
329− <expression>\S+</expression>
345+ <expression>where</expression>
331− <include syntax="self" collection="type" repeat="true" optional="true" />
334−
347+ <include syntax="self" collection="type" />
335− <include syntax="self" collection="type-family-case-definition" optional="true" repeat="true" />
348+ <include syntax="self" collection="type-definition" />
349+ <include syntax="self" collection="type-annotation" />
350+ <include syntax="self" collection="definition" />
336 </subscopes>
351 </subscopes>
338 </collection>
353 </collection>
340− <collection name="type-family-case-definition">
355+ <collection name="type-family-definition">
341− <scope name="haskell.definition.type-family.type.case">
356+ <scope name="haskell.definition.type.type-family">
357+ <symbol type="type" />
342 <starts-with>
358 <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" />
344 </starts-with>
361 </starts-with>
345 <ends-with>
362 <ends-with>
346 <template>^(?!\s+\1\S)(?!\s*$)</template>
363 <template>^(?!\s+\1\S)(?!\s*$)</template>
347 </ends-with>
364 </ends-with>
348 <subscopes>
365 <subscopes>
349− <include syntax="self" collection="comments" />
366+ <scope name="haskell.keyword.construct.where">
350− <include syntax="self" collection="type" optional="true" repeat="true" />
352− <expression>=</expression>
367+ <expression>where</expression>
354− <include syntax="self" collection="type" optional="true" repeat="true" />
369+ <include syntax="self" collection="type" />
355 </subscopes>
370 </subscopes>
357 </collection>
372 </collection>
@@ -359,26 +374,47 @@
359 <collection name="definition">
374 <collection name="definition">
360 <scope name="haskell.definition.type.function">
375 <scope name="haskell.definition.type.function">
361 <symbol type="function">
376 <symbol type="function">
362− <context behavior="whitespace" foldable="true" />
377+ <display-name>
378+ <component selector="haskell.definition.type.function" />
363 </symbol>
381 </symbol>
364 <starts-with>
382 <starts-with>
365 <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
383 <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
366 <capture number="2" name="haskell.keyword.construct.default" />
384 <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" />
368 </starts-with>
386 </starts-with>
369 <ends-with>
387 <ends-with>
370 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
388 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
371 </ends-with>
389 </ends-with>
372 <subscopes>
390 <subscopes>
373− <include syntax="self" collection="comments" />
374 <include syntax="self" collection="type-annotation" />
391 <include syntax="self" collection="type-annotation" />
375 <include syntax="self" collection="implementation" />
392 <include syntax="self" collection="implementation" />
376 </subscopes>
393 </subscopes>
378 </collection>
395 </collection>
397+ <collection name="do-bind">
398+ <scope name="do-bind">
400+ <expression>^(?=(\h*).+<-($|\h))</expression>
403+ <template>^(?!\0)(?!\s+\1\S)(?!\s*$)</template>
405+ <subscopes anchored="true">
406+ <include syntax="self" collection="pattern-match" />
407+ <scope name="bind-arrow">
408+ <expression><-</expression>
410+ <include syntax="self" collection="expressions" repeat="true" />
380 <collection name="implementation">
415 <collection name="implementation">
381− <scope name="haskell.definition.type.function.implementation">
416+ <scope name="haskell.definition.type.function">
417+ <local scope="within-construct" />
382 <starts-with>
418 <starts-with>
383 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
419 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
384 <capture number="2" name="haskell.keyword.construct.default" />
420 <capture number="2" name="haskell.keyword.construct.default" />
@@ -388,20 +424,14 @@
388 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
424 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
389 </ends-with>
425 </ends-with>
390 <subscopes>
426 <subscopes>
391− <include syntax="self" collection="comments" />
427+ <include syntax="self" collection="where-clause" />
392− <include syntax="self" collection="pattern-match" optional="true" repeat="true" />
428+ <include syntax="self" collection="expressions" />
394− <expression>=</expression>
395− <capture number="0" name="haskell.construct.function.keyword.eq" />
397− <include syntax="self" collection="expressions" optional="true" repeat="true" />
398− <include syntax="self" collection="where-clause" optional="true" />
399 </subscopes>
429 </subscopes>
401 </collection>
431 </collection>
403 <collection name="type-annotation">
433 <collection name="type-annotation">
404− <scope name="haskell.definition.type.function.type-signature">
434+ <scope name="haskell.definition.type.function">
405 <starts-with>
435 <starts-with>
406 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
436 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
407 <capture number="2" name="haskell.identifier.function" />
437 <capture number="2" name="haskell.identifier.function" />
@@ -410,7 +440,6 @@
410 <template>^(?!\s+\1\S)(?!\s*$)</template>
440 <template>^(?!\s+\1\S)(?!\s*$)</template>
411 </ends-with>
441 </ends-with>
412 <subscopes>
442 <subscopes>
413− <include syntax="self" collection="comments" />
414 <include syntax="self" collection="type" />
443 <include syntax="self" collection="type" />
415 </subscopes>
444 </subscopes>
@@ -418,19 +447,15 @@
419 <collection name="type-definition">
448 <collection name="type-definition">
420 <scope name="haskell.definition.type">
449 <scope name="haskell.definition.type">
421− <symbol type="type" scope="global">
422− <context behavior="whitespace" foldable="true" />
424 <starts-with>
450 <starts-with>
425 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
451 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
426 <capture number="2" name="haskell.keyword.construct.type" />
452 <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" />
428 </starts-with>
454 </starts-with>
429 <ends-with>
455 <ends-with>
430 <template>^(?!\s+\1\S)(?!\s*$)</template>
456 <template>^(?!\s+\1\S)(?!\s*$)</template>
431 </ends-with>
457 </ends-with>
432 <subscopes>
458 <subscopes>
433− <include syntax="self" collection="comments" />
434 <include syntax="self" collection="type" />
459 <include syntax="self" collection="type" />
435 </subscopes>
460 </subscopes>
@@ -438,72 +463,66 @@
439 <collection name="GADT-definition">
464 <collection name="GADT-definition">
440 <scope name="haskell.definition.struct.GADT">
465 <scope name="haskell.definition.struct.GADT">
441− <symbol type="struct" scope="global">
442− <context behavior="subtree" foldable="false" />
444 <starts-with>
466 <starts-with>
445− <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
467+ <expression>^(\h*)(data)\h+(\w(\w|')*)</expression>
446 <capture number="2" name="haskell.keyword.construct.data.GADT" />
468 <capture number="2" name="haskell.keyword.construct.data.GADT" />
447− <capture number="3" name="haskell.identifier.data.type.name" />
448 </starts-with>
469 </starts-with>
449 <ends-with>
470 <ends-with>
450 <template>^(?!\s+\1\S)(?!\s*$)</template>
471 <template>^(?!\s+\1\S)(?!\s*$)</template>
451 </ends-with>
472 </ends-with>
452 <subscopes>
473 <subscopes>
453− <include syntax="self" collection="comments" />
454− <scope name="haskell.keyword.construct.where">
455− <expression>where</expression>
458− <include syntax="self" collection="deriving-clause" />
459− <include syntax="self" collection="record-definition" />
460 <include syntax="self" collection="gadt-constructor" />
474 <include syntax="self" collection="gadt-constructor" />
461 <include syntax="self" collection="type" />
475 <include syntax="self" collection="type" />
476+ <include syntax="self" collection="record-definition" />
477+ <include syntax="self" collection="record-definition-field-name" />
462 </subscopes>
478 </subscopes>
464 </collection>
480 </collection>
466 <collection name="gadt-constructor">
482 <collection name="gadt-constructor">
467− <scope name="haskell.identifier.type.struct.data.constructor">
483+ <scope name="identifier.type.struct.GADT.constructor">
468− <symbol type="constructor">
484+ <expression>^\h+[A-Z](\w|')*</expression>
469− <context behavior="subtree" foldable="true" />
485+ </scope>
470− </symbol>
486+ </collection>
488+ <collection name="data-definition">
489+ <scope name="haskell.definition.struct.data">
471 <starts-with>
490 <starts-with>
472− <expression>(^|=|\||^)\h+([A-Z](\w|')*)</expression>
491+ <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
473− <capture number="2" name="haskell.identifier.data.name" />
492+ <capture number="2" name="haskell.keyword.construct.data.newtype" />
493+ <capture number="3" name="haskell.identifier.type" />
474 </starts-with>
494 </starts-with>
475− <ends-with />
495+ <ends-with>
496+ <template>^(?!\s+\1\S)(?!\s*$)</template>
476− <subscopes anchored="true">
498+ <subscopes>
477 <include syntax="self" collection="record-definition" />
499 <include syntax="self" collection="record-definition" />
500+ <include syntax="self" collection="data-constructor" />
501+ <include syntax="self" collection="type" />
478 </subscopes>
502 </subscopes>
480 </collection>
504 </collection>
482− <collection name="deriving-clause">
506+ <collection name="data-constructor">
483− <scope name="haskell.record.construct.deriving.keyword">
507+ <scope name="haskell.identifier.type.struct.data.constructor">
484− <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
508+ <expression>=\h+[A-Z](\w|')*</expression>
486− <scope name="haskell.record.construct.deriving.keyword">
510+ <scope name="haskell.identifier.type.struct.data.constructor">
487− <include syntax="self" collection="comments" />
488− <expression>via</expression>
511+ <expression>\|\h+[A-Z](\w|')*</expression>
490 </collection>
513 </collection>
492 <collection name="record-definition">
515 <collection name="record-definition">
493 <scope name="haskell.record">
516 <scope name="haskell.record">
495− <context behavior="subtree" foldable="true" />
497 <starts-with>
517 <starts-with>
498− <expression>(?=\{)</expression>
518+ <expression>(\{)</expression>
499− <capture number="0" name="haskell.record.bracket" />
519+ <capture number="1" name="haskell.record.bracket" />
500 </starts-with>
520 </starts-with>
501 <ends-with>
521 <ends-with>
502 <expression>(\})</expression>
522 <expression>(\})</expression>
503 <capture number="1" name="haskell.record.bracket" />
523 <capture number="1" name="haskell.record.bracket" />
504 </ends-with>
524 </ends-with>
505 <subscopes>
525 <subscopes>
506− <include syntax="self" collection="comments" />
507 <include syntax="self" collection="record-definition-field-name" />
526 <include syntax="self" collection="record-definition-field-name" />
508 <include syntax="self" collection="type" />
527 <include syntax="self" collection="type" />
509 </subscopes>
528 </subscopes>
@@ -512,65 +531,26 @@
513 <collection name="record-definition-field-name">
532 <collection name="record-definition-field-name">
514 <scope name="haskell.record.definition.property">
533 <scope name="haskell.record.definition.property">
515− <symbol type="property" />
516− <expression>(((?![A-Z])\w(\w|')*)\h*::|(^|\{|,)\h*((?![A-Z])\w(\w|')*))</expression>
534+ <expression>\w(\w|')*\h*::</expression>
517− <capture number="5" name="haskell.record.definition.property.field.property.name" />
518− <capture number="2" name="haskell.record.definition.property.field.property.name" />
520 </collection>
536 </collection>
522 <collection name="type">
538 <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>
563 <include syntax="self" collection="type-list" />
539 <include syntax="self" collection="type-list" />
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>
569 <scope name="haskell.keyword.construct.forall">
543 <scope name="haskell.keyword.construct.forall">
570 <expression>forall</expression>
544 <expression>forall</expression>
572 <scope name="haskell.identifier.type.variable">
546 <scope name="haskell.identifier.type.variable">
573− <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\w)*</expression>
547+ <expression>\w(\w|')*</expression>
549+ <scope name="haskell.keyword.construct.function-arrow">
550+ <expression>-></expression>
552+ <scope name="haskell.keyword.construct.fat-arrow">
553+ <expression>=></expression>
575 </collection>
555 </collection>
@@ -585,7 +565,6 @@
585 <template>^(?!\s+\1\S)(?!\s*$)</template>
565 <template>^(?!\s+\1\S)(?!\s*$)</template>
586 </ends-with>
566 </ends-with>
587 <subscopes>
567 <subscopes>
588− <include syntax="self" collection="comments" />
589 <scope name="haskell.keyword.construct.where">
568 <scope name="haskell.keyword.construct.where">
590 <expression>where</expression>
569 <expression>where</expression>
@@ -605,7 +584,6 @@
605 <capture number="1" name="haskell.type-list.bracket" />
584 <capture number="1" name="haskell.type-list.bracket" />
606 </ends-with>
585 </ends-with>
607 <subscopes>
586 <subscopes>
608− <include syntax="self" collection="comments" />
609 <include syntax="self" collection="type" />
587 <include syntax="self" collection="type" />
610 </subscopes>
588 </subscopes>
@@ -622,7 +600,6 @@
622 <capture number="1" name="haskell.keyword.construct.lambda" />
600 <capture number="1" name="haskell.keyword.construct.lambda" />
623 </ends-with>
601 </ends-with>
624 <subscopes>
602 <subscopes>
625− <include syntax="self" collection="comments" />
626 <include syntax="self" collection="pattern-match" />
603 <include syntax="self" collection="pattern-match" />
627 </subscopes>
604 </subscopes>
@@ -636,6 +613,7 @@
637 <collection name="where-clause">
614 <collection name="where-clause">
638 <scope name="haskell.construct.where">
615 <scope name="haskell.construct.where">
616+ <local scope="within-parent" />
639 <starts-with>
617 <starts-with>
640 <expression>^(\h*)(where)</expression>
618 <expression>^(\h*)(where)</expression>
641 <capture number="2" name="haskell.construct.keyword.where" />
619 <capture number="2" name="haskell.construct.keyword.where" />
@@ -644,7 +622,6 @@
644 <template>^(?!\1\s*\S)(?!s*$)</template>
622 <template>^(?!\1\s*\S)(?!s*$)</template>
645 </ends-with>
623 </ends-with>
646 <subscopes>
624 <subscopes>
647− <include syntax="self" collection="comments" />
648 <include syntax="self" collection="definition" />
625 <include syntax="self" collection="definition" />
649 </subscopes>
626 </subscopes>
@@ -653,9 +630,7 @@
654 <collection name="qvarid">
631 <collection name="qvarid">
655 <scope name="haskell.identifier.function">
632 <scope name="haskell.identifier.function">
656− <expression>(([A-Z](\w|')*\.)*)(\w(\w|')*)</expression>
633+ <expression>([A-Z](\w|')*\.)*\w(\w|')*</expression>
657− <capture number="1" name="haskell.identifier.package.module" />
658− <capture number="4" name="haskell.identifier.type" />
660 </collection>
635 </collection>
@@ -684,12 +659,12 @@
686 <collection name="strings">
661 <collection name="strings">
687− <scope name="haskell.string.double-quoted" spell-check="true">
662+ <scope name="haskell.string.double-quoted">
688 <starts-with>
663 <starts-with>
689− <expression>"</expression>
664+ <expression>"</expression>
690 </starts-with>
665 </starts-with>
691 <ends-with>
666 <ends-with>
692− <expression>"</expression>
667+ <expression>"</expression>
693 </ends-with>
668 </ends-with>
694 <subscopes>
669 <subscopes>
695 <scope name="haskell.string.escape-sequences">
670 <scope name="haskell.string.escape-sequences">
@@ -712,11 +687,8 @@
713 <collection name="module">
688 <collection name="module">
714 <scope name="haskell.definition.module.package">
689 <scope name="haskell.definition.module.package">
715− <symbol type="package">
716− <context behavior="subtree" foldable="true" export-local="true" />
718 <starts-with>
690 <starts-with>
719− <expression>^(module)\s+((\w|\.)+)</expression>
691+ <expression>^(module)\s+(\w|\.)+</expression>
720 <capture number="1" name="haskell.construct.keyword.module" />
692 <capture number="1" name="haskell.construct.keyword.module" />
721 <capture number="2" name="haskell.definition.module.package" />
693 <capture number="2" name="haskell.definition.module.package" />
722 </starts-with>
694 </starts-with>
@@ -724,75 +696,32 @@
724 <expression>(where)</expression>
696 <expression>(where)</expression>
725 <capture number="1" name="haskell.construct.keyword.module" />
697 <capture number="1" name="haskell.construct.keyword.module" />
726 </ends-with>
698 </ends-with>
727− <subscopes>
699+ <subscopes export-symbols="true">
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" />
734− <scope name="identifier.variable">
700+ <scope name="identifier.constant">
735− <symbol type="expression" />
736 <expression>(\w|')+</expression>
701 <expression>(\w|')+</expression>
737− <capture number="0" name="identifier.haskell.function" />
739 </subscopes>
703 </subscopes>
741 </collection>
705 </collection>
743 <collection name="import">
707 <collection name="import">
744− <scope name="haskell.construct.import">
708+ <scope name="haskell.construct.keyword.import">
746− <expression>^(import)\s</expression>
709+ <expression>^import\s</expression>
747− <capture number="1" name="haskell.construct.keyword.import" />
710+ </scope>
750− <expression>(?=^\S)</expression>
753− <scope name="haskell.construct.qualified">
754− <symbol type="expression" />
755− <expression>qualified</expression>
756− <capture number="0" name="haskell.construct.keyword.qualified" />
759− <scope name="haskell.construct.hiding">
711+ <scope name="haskell.construct.keyword.qualified">
760− <symbol type="keyword">
761− <context behavior="subtree" />
764− <expression>(hiding)\h*(?=\()</expression>
765− <capture number="1" name="haskell.construct.keyword.hiding" />
768− <expression>(?=\))</expression>
712+ <expression>qualified</expression>
770− <subscopes anchored="true">
771− <include syntax="self" collection="import-list" />
772− <symbol type="expression" />
774− </scope>
713+ </scope>
776− <scope name="haskell.construct.keyword.as">
714+ <scope name="haskell.construct.keyword.as">
777− <symbol type="package" />
778− <expression>as(\h+([A-Z]\w*))?</expression>
715+ <expression>as</expression>
779− <capture number="2" name="haskell.package.qualified.name" />
780− </scope>
716+ </scope>
781− <scope name="haskell.identifier.module.package">
717+ <scope name="haskell.identifier.module.package">
782− <symbol type="package" />
783− <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
718+ <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
784− <capture number="0" name="haskell.package.name" />
786− <include syntax="self" collection="import-list" />
720+ <include syntax="self" collection="import-list" />
789 </collection>
721 </collection>
791 <collection name="import-list">
723 <collection name="import-list">
792 <scope name="import-list">
724 <scope name="import-list">
794− <context behavior="subtree" export-local="true" />
796 <starts-with>
725 <starts-with>
797 <expression>(\()</expression>
726 <expression>(\()</expression>
798 <capture number="1" name="haskell.import-list.bracket" />
727 <capture number="1" name="haskell.import-list.bracket" />
@@ -802,21 +731,20 @@
802 <capture number="1" name="haskell.import-list.bracket" />
731 <capture number="1" name="haskell.import-list.bracket" />
803 </ends-with>
732 </ends-with>
804 <subscopes>
733 <subscopes>
805− <scope name="haskell.identifier.struct">
734+ <scope name="identifier.decorator">
806− <symbol type="expression" />
807− <symbol type="reference" scope="local" />
808− <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
735+ <expression>([A-Z](\w|')*\.)*\w(\w|')*</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" />
816 </subscopes>
737 </subscopes>
818 </collection>
739 </collection>
741+ <!-- <collection name="special">
743+ <expression>(;|,)</expression>
820 <collection name="reservedop">
748 <collection name="reservedop">
821 <scope name="keyword.operator">
749 <scope name="keyword.operator">
822 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
750 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
@@ -824,11 +752,10 @@
824 </collection>
752 </collection>
826 <collection name="keywords">
754 <collection name="keywords">
827− <scope name="haskell.keyword.self">
755+ <scope name="haskell.keyword.modifier">
828 <symbol type="keyword" />
756 <symbol type="keyword" />
829 <strings>
757 <strings>
830 <string>do</string>
758 <string>do</string>
831− <string>mdo</string>
832 <string>in</string>
759 <string>in</string>
833 <string>infix</string>
760 <string>infix</string>
834 <string>infixl</string>
761 <string>infixl</string>
@@ -866,18 +793,20 @@
866 <strings>
793 <strings>
867 <string>undefined</string>
794 <string>undefined</string>
868 <string>_</string>
795 <string>_</string>
870 </strings>
796 </strings>
872 </collection>
798 </collection>
874 <collection name="comments">
800 <collection name="comments">
875 <scope name="haskell.comment.single" spell-check="true">
801 <scope name="haskell.comment.single" spell-check="true">
876− <symbol type="comment" />
802+ <starts-with>
803+ <expression>--</expression>
877− <expression> --.*$</expression>
806+ <expression>$</expression>
879 <scope name="haskell.comment.block" spell-check="true">
809 <scope name="haskell.comment.block" spell-check="true">
880− <symbol type="comment" />
881 <starts-with>
810 <starts-with>
882 <expression>{-</expression>
811 <expression>{-</expression>
883 </starts-with>
812 </starts-with>