@@ -1,9 +1,9 @@
11<?xml version="1.0" encoding="UTF-8"?>
22<syntax name="haskell">
33 <meta>
4− <name>Haskell</name>
5− <type>compiled</type>
6− <preferred-file-extension>hs</preferred-file-extension>
4+ <name>Haskell</name>
5+ <type>compiled</type>
6+ <preferred-file-extension>hs</preferred-file-extension>
77 </meta>
88
99 <detectors>
@@ -57,7 +57,6 @@
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" /> -->
6160 <include syntax="self" collection="GADT-definition" />
6261 <include syntax="self" collection="instance" />
6362 <include syntax="self" collection="typeclass" />
@@ -66,7 +65,6 @@
6665
6766 <template-scopes>
6867 <include syntax="self" collection="Quote" />
69− <include syntax="self" collection="comments" />
7068 </template-scopes>
7169
7270 <collections>
@@ -79,51 +77,27 @@
7977 </collection>
8078
8179 <collection name="expressions">
82− <include syntax="self" collection="do-bind" />
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" />
8390 <include syntax="self" collection="literal" />
8491 <include syntax="self" collection="operators" />
92+ <include syntax="self" collection="record-match" />
8593 <include syntax="self" collection="list" />
94+ <include syntax="self" collection="view-pattern" />
8695 <include syntax="self" collection="lambda-case" />
8796 <include syntax="self" collection="lambda-head" />
88− <include syntax="self" collection="type-applications" />
89− <include syntax="self" collection="outer-case-expression" />
97+ <include syntax="self" collection="case-expression" />
98+ <include syntax="self" collection="qconid" />
9099 <include syntax="self" collection="qvarid" />
91100 <include syntax="self" collection="tuple" />
92−
93−
94− <!-- Needed for do binds -->
95− <!-- <include syntax="self" collection="pattern-match" /> -->
96− </collection>
97−
98− <collection name="pattern-match">
99− <include syntax="self" collection="literal" />
100− <include syntax="self" collection="tuple-match" />
101− <!-- <include syntax="self" collection="at-pattern" /> -->
102− <include syntax="self" collection="varid" />
103− <include syntax="self" collection="qconid" />
104− <include syntax="self" collection="record-match" />
105− <include syntax="self" collection="list-pattern" />
106− <include syntax="self" collection="view-pattern" />
107− </collection>
108−
109− <collection name="type-applications">
110− <scope name="type-applications">
111− <starts-with>
112− <expression>(\s@)\(</expression>
113− <capture number="1" name="haskell.keyword.operator.typeapplication" />
114− </starts-with>
115− <ends-with>
116− <expression>)</expression>
117− </ends-with>
118− <subscopes>
119− <include syntax="self" collection="type" />
120− </subscopes>
121− </scope>
122− <scope name="type-applications-single">
123− <expression>(@)(\w+)</expression>
124− <capture number="1" name="haskell.keyword.operator.typeapplication" />
125− <capture number="2" name="haskell.identifier.type" />
126− </scope>
127101 </collection>
128102
129103 <collection name="Quote">
@@ -162,8 +136,8 @@
162136 <capture number="1" name="haskell.pattern.record.bracket" />
163137 </ends-with>
164138 <subscopes>
165− <include syntax="self" collection="pattern-match" />
166− <include syntax="self" collection="varid" />
139+ <include syntax="self" collection="comments" />
140+ <include syntax="self" collection="expressions" />
167141 <scope name="record-sep">
168142 <expression>=</expression>
169143 </scope>
@@ -185,6 +159,7 @@
185159 <capture number="1" name="haskell.pattern.record.bracket" />
186160 </ends-with>
187161 <subscopes>
162+ <include syntax="self" collection="comments" />
188163 <scope name="haskell.pattern.record.wildcard">
189164 <expression>\.\.</expression>
190165 </scope>
@@ -211,29 +186,12 @@
211186 <capture number="1" name="haskell.list.bracket" />
212187 </ends-with>
213188 <subscopes>
189+ <include syntax="self" collection="comments" />
214190 <include syntax="self" collection="expressions" />
215191 </subscopes>
216192 </scope>
217193 </collection>
218194
219− <collection name="list-pattern">
220− <symbol type="expression" />
221− <scope name="haskell.pattern.list">
222− <starts-with>
223− <expression>(\[)</expression>
224− <capture number="1" name="haskell.pattern.list.bracket" />
225− </starts-with>
226− <ends-with>
227− <expression>(\])</expression>
228− <capture number="1" name="haskell.pattern.list.bracket" />
229− </ends-with>
230− <subscopes>
231− <include syntax="self" collection="pattern-match" />
232− </subscopes>
233− </scope>
234− </collection>
235−
236−
237195 <collection name="view-pattern">
238196 <scope name="haskell.pattern.view">
239197 <symbol type="expression" />
@@ -250,24 +208,7 @@
250208 <scope name="haskell.pattern.view.operator.arrow">
251209 <expression>-></expression>
252210 </scope>
253− <include syntax="self" collection="pattern-match" />
254− </subscopes>
255− </scope>
256− </collection>
257−
258− <collection name="tuple-match">
259− <symbol type="expression" />
260− <scope name="haskell.pattern.tuple">
261− <starts-with>
262− <expression>(\()</expression>
263− <capture number="1" name="haskell.pattern.tuple.bracket" />
264− </starts-with>
265− <ends-with>
266− <expression>(\))</expression>
267− <capture number="1" name="haskell.pattern.tuple.bracket" />
268− </ends-with>
269− <subscopes>
270− <include syntax="self" collection="pattern-match" />
211+ <include syntax="self" collection="expressions" />
271212 </subscopes>
272213 </scope>
273214 </collection>
@@ -283,53 +224,11 @@
283224 <capture number="1" name="haskell.case.keyword.condition" />
284225 </ends-with>
285226 <subscopes anchored="true">
286− <include syntax="self" collection="pattern-match" />
287− </subscopes>
288− </scope>
289− </collection>
290−
291− <collection name="case-match">
292− <scope name="case-match">
293− <starts-with>
294− <expression>(?=((\h*)\S.*->($|\h)))</expression>
295− </starts-with>
296− <ends-with>
297− <expression>-></expression>
298− </ends-with>
299− <subscopes anchored="true">
300− <include syntax="self" collection="pattern-match" />
301− </subscopes>
302− </scope>
303− </collection>
304−
305− <collection name="inner-case-expressions">
306− <scope name="inner-case-expressions">
307− <starts-with>
308− <expression>(?=((\h*)\S.*->($|\h)))</expression>
309− </starts-with>
310− <ends-with>
311− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
312− </ends-with>
313− <subscopes>
314− <include syntax="self" collection="case-match" />
315227 <include syntax="self" collection="expressions" />
316228 </subscopes>
317229 </scope>
318230 </collection>
319231
320− <collection name="outer-case-expression">
321− <scope name="outer-case-expression">
322− <starts-with>
323− <expression>(?=case)</expression>
324− </starts-with>
325− <ends-with />
326− <subscopes anchored="true" skip-whitespace="false">
327− <include syntax="self" collection="case-expression" />
328− <include syntax="self" collection="inner-case-expressions" repeat="true" />
329− </subscopes>
330− </scope>
331− </collection>
332−
333232 <collection name="tuple">
334233 <symbol type="expression" />
335234 <scope name="haskell.tuple">
@@ -342,60 +241,73 @@
342241 <capture number="1" name="haskell.tuple.bracket" />
343242 </ends-with>
344243 <subscopes>
244+ <include syntax="self" collection="comments" />
345245 <include syntax="self" collection="expressions" />
346246 </subscopes>
347247 </scope>
348248 </collection>
349249
350250 <collection name="typeclass">
351− <symbol type="interface" />
352− <scope name="haskell.definition.class">
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>
353255 <starts-with>
354256 <expression>^(\h*)(class)($|\h)</expression>
355257 <capture number="2" name="haskell.keyword.construct.class" />
356258 </starts-with>
357− <ends-with>
358− <template>^(?!\s+\1\S)(?!\s*$)</template>
359− </ends-with>
360− <subscopes>
361− <scope name="haskell.keyword.construct.where">
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">
362274 <expression>where</expression>
363275 </scope>
364− <include syntax="self" collection="type" />
365− <include syntax="self" collection="type-definition" />
366− <!-- <include syntax="self" collection="type-annotation" /> -->
367− <include syntax="self" collection="definition" />
368276 </subscopes>
369277 </scope>
370278 </collection>
371279
372280 <collection name="instance">
373281 <scope name="haskell.instance">
374− <symbol type="category" />
282+ <symbol type="category" name-selector="haskell.keyword.construct.instance.name">
283+ <context behavior="whitespace" foldable="true" />
284+ </symbol>
375285 <starts-with>
376286 <expression>^(\h*)(instance)($|\h)</expression>
377287 <capture number="2" name="haskell.keyword.construct.instance" />
378288 </starts-with>
379− <ends-with>
380− <template>^(?!\s+\1\S)(?!\s*$)</template>
381− </ends-with>
382− <subscopes>
383− <scope name="haskell.keyword.construct.where">
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">
384303 <expression>where</expression>
385304 </scope>
386− <include syntax="self" collection="type" />
387− <include syntax="self" collection="type-definition" />
388− <include syntax="self" collection="type-annotation" />
389− <include syntax="self" collection="definition" />
390305 </subscopes>
391306 </scope>
392307 </collection>
393308
394309 <collection name="type-family-definition">
395310 <scope name="haskell.definition.type-family.type">
396− <symbol type="type">
397− <context behavior="subtree" foldable="false" />
398− </symbol>
399311 <starts-with>
400312 <expression>^(\h*)(type\h+family)</expression>
401313 <capture number="2" name="haskell.keyword.construct.type-family" />
@@ -434,6 +346,7 @@
434346 <template>^(?!\s+\1\S)(?!\s*$)</template>
435347 </ends-with>
436348 <subscopes>
349+ <include syntax="self" collection="comments" />
437350 <include syntax="self" collection="type" optional="true" repeat="true" />
438351 <scope>
439352 <expression>=</expression>
@@ -446,65 +359,26 @@
446359 <collection name="definition">
447360 <scope name="haskell.definition.type.function">
448361 <symbol type="function">
449− <display-name>
450− <component selector="haskell.definition.type.function" />
451− </display-name>
452−
362+ <context behavior="whitespace" foldable="true" />
453363 </symbol>
454364 <starts-with>
455365 <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
456366 <capture number="2" name="haskell.keyword.construct.default" />
457− <capture number="3" name="haskell.identifier.function" />
367+ <capture number="3" name="haskell.identifier.function.name" />
458368 </starts-with>
459369 <ends-with>
460370 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
461371 </ends-with>
462372 <subscopes>
373+ <include syntax="self" collection="comments" />
463374 <include syntax="self" collection="type-annotation" />
464375 <include syntax="self" collection="implementation" />
465376 </subscopes>
466377 </scope>
467378 </collection>
468379
469− <collection name="do-bind">
470− <scope name="do-bind">
471− <starts-with>
472− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
473− </starts-with>
474− <ends-with>
475− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
476− </ends-with>
477− <subscopes>
478− <include syntax="self" collection="do-pattern" />
479− <include syntax="self" collection="expressions" />
480− <!-- <scope name="bind-arrow">
481− <expression><-</expression>
482− </scope> -->
483− </subscopes>
484− </scope>
485− </collection>
486−
487− <collection name="do-pattern">
488− <scope name="do-pattern">
489− <starts-with>
490− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
491− </starts-with>
492− <ends-with>
493− <expression><-</expression>
494− </ends-with>
495− <subscopes>
496− <include syntax="self" collection="pattern-match" />
497− <!-- <scope name="bind-arrow">
498− <expression><-</expression>
499− </scope>
500− <include syntax="self" collection="expressions" repeat="true" /> -->
501− </subscopes>
502− </scope>
503− </collection>
504−
505380 <collection name="implementation">
506− <scope name="haskell.definition.type.function">
507− <local scope="within-construct" />
381+ <scope name="haskell.definition.type.function.implementation">
508382 <starts-with>
509383 <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
510384 <capture number="2" name="haskell.keyword.construct.default" />
@@ -514,14 +388,20 @@
514388 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
515389 </ends-with>
516390 <subscopes>
517− <include syntax="self" collection="where-clause" />
518− <include syntax="self" collection="expressions" />
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" />
519399 </subscopes>
520400 </scope>
521401 </collection>
522402
523403 <collection name="type-annotation">
524− <scope name="haskell.definition.type.function">
404+ <scope name="haskell.definition.type.function.type-signature">
525405 <starts-with>
526406 <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
527407 <capture number="2" name="haskell.identifier.function" />
@@ -530,6 +410,7 @@
530410 <template>^(?!\s+\1\S)(?!\s*$)</template>
531411 </ends-with>
532412 <subscopes>
413+ <include syntax="self" collection="comments" />
533414 <include syntax="self" collection="type" />
534415 </subscopes>
535416 </scope>
@@ -537,15 +418,19 @@
537418
538419 <collection name="type-definition">
539420 <scope name="haskell.definition.type">
421+ <symbol type="type" scope="global">
422+ <context behavior="whitespace" foldable="true" />
423+ </symbol>
540424 <starts-with>
541425 <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
542426 <capture number="2" name="haskell.keyword.construct.type" />
543− <capture number="3" name="haskell.identifier.type" />
427+ <capture number="3" name="haskell.identifier.type.name" />
544428 </starts-with>
545429 <ends-with>
546430 <template>^(?!\s+\1\S)(?!\s*$)</template>
547431 </ends-with>
548432 <subscopes>
433+ <include syntax="self" collection="comments" />
549434 <include syntax="self" collection="type" />
550435 </subscopes>
551436 </scope>
@@ -553,7 +438,7 @@
553438
554439 <collection name="GADT-definition">
555440 <scope name="haskell.definition.struct.GADT">
556− <symbol type="struct">
441+ <symbol type="struct" scope="global">
557442 <context behavior="subtree" foldable="false" />
558443 </symbol>
559444 <starts-with>
@@ -565,6 +450,7 @@
565450 <template>^(?!\s+\1\S)(?!\s*$)</template>
566451 </ends-with>
567452 <subscopes>
453+ <include syntax="self" collection="comments" />
568454 <scope name="haskell.keyword.construct.where">
569455 <expression>where</expression>
570456 </scope>
@@ -580,21 +466,26 @@
580466 <collection name="gadt-constructor">
581467 <scope name="haskell.identifier.type.struct.data.constructor">
582468 <symbol type="constructor">
583− <context behavior="whitespace" />
469+ <context behavior="subtree" foldable="true" />
584470 </symbol>
585− <expression>(^|=|\|)\h+([A-Z](\w|')*)</expression>
586− <capture number="2" name="haskell.identifier.data.name" />
587− </scope>
588− <scope name="identifier.type.struct.GADT.constructor">
589− <symbol type="constructor"></symbol>
590− <expression>^\h+([A-Z](\w|')*)</expression>
591− <capture number="1" name="haskell.identifier.data.name" />
471+ <starts-with>
472+ <expression>(^|=|\||^)\h+([A-Z](\w|')*)</expression>
473+ <capture number="2" name="haskell.identifier.data.name" />
474+ </starts-with>
475+ <ends-with />
476+ <subscopes anchored="true">
477+ <include syntax="self" collection="record-definition" />
478+ </subscopes>
592479 </scope>
593480 </collection>
594481
595482 <collection name="deriving-clause">
596483 <scope name="haskell.record.construct.deriving.keyword">
597− <expression>deriving\h+(newtype|stock|anyclass)</expression>
484+ <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
485+ </scope>
486+ <scope name="haskell.record.construct.deriving.keyword">
487+ <include syntax="self" collection="comments" />
488+ <expression>via</expression>
598489 </scope>
599490 </collection>
600491
@@ -612,6 +503,7 @@
612503 <capture number="1" name="haskell.record.bracket" />
613504 </ends-with>
614505 <subscopes>
506+ <include syntax="self" collection="comments" />
615507 <include syntax="self" collection="record-definition-field-name" />
616508 <include syntax="self" collection="type" />
617509 </subscopes>
@@ -628,6 +520,13 @@
628520 </collection>
629521
630522 <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" />
631530 <scope name="haskell.type.construct.tuple">
632531 <starts-with>
633532 <expression>\(</expression>
@@ -636,6 +535,7 @@
636535 <expression>\)</expression>
637536 </ends-with>
638537 <subscopes>
538+ <include syntax="self" collection="comments" />
639539 <scope name="haskell.construct.type.typle.comma">
640540 <expression>\,</expression>
641541 </scope>
@@ -650,6 +550,7 @@
650550 <expression>\]</expression>
651551 </ends-with>
652552 <subscopes>
553+ <include syntax="self" collection="comments" />
653554 <include syntax="self" collection="type" />
654555 </subscopes>
655556 </scope>
@@ -661,7 +562,7 @@
661562 </scope>
662563 <include syntax="self" collection="type-list" />
663564 <scope>
664− <expression>(([A-Z](\w|')*\.)*)'*([A-Z](\w|')*)</expression>
565+ <expression>(([A-Z](\w|')*\.)*)'*\!?([A-Z](\w|')*)</expression>
665566 <capture number="1" name="haskell.identifier.package.module" />
666567 <capture number="4" name="haskell.identifier.type" />
667568 </scope>
@@ -669,13 +570,7 @@
669570 <expression>forall</expression>
670571 </scope>
671572 <scope name="haskell.identifier.type.variable">
672− <expression>(?!=)((?!(\(|\)|\,))\S)((?!(\(|\)|\,))\S)*</expression>
673− </scope>
674− <scope name="haskell.keyword.construct.function-arrow">
675− <expression>-></expression>
676− </scope>
677− <scope name="haskell.keyword.construct.fat-arrow">
678− <expression>=></expression>
573+ <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\w)*</expression>
679574 </scope>
680575 </collection>
681576
@@ -690,6 +585,7 @@
690585 <template>^(?!\s+\1\S)(?!\s*$)</template>
691586 </ends-with>
692587 <subscopes>
588+ <include syntax="self" collection="comments" />
693589 <scope name="haskell.keyword.construct.where">
694590 <expression>where</expression>
695591 </scope>
@@ -709,6 +605,7 @@
709605 <capture number="1" name="haskell.type-list.bracket" />
710606 </ends-with>
711607 <subscopes>
608+ <include syntax="self" collection="comments" />
712609 <include syntax="self" collection="type" />
713610 </subscopes>
714611 </scope>
@@ -725,6 +622,7 @@
725622 <capture number="1" name="haskell.keyword.construct.lambda" />
726623 </ends-with>
727624 <subscopes>
625+ <include syntax="self" collection="comments" />
728626 <include syntax="self" collection="pattern-match" />
729627 </subscopes>
730628 </scope>
@@ -738,7 +636,6 @@
738636
739637 <collection name="where-clause">
740638 <scope name="haskell.construct.where">
741− <local scope="within-parent" />
742639 <starts-with>
743640 <expression>^(\h*)(where)</expression>
744641 <capture number="2" name="haskell.construct.keyword.where" />
@@ -747,6 +644,7 @@
747644 <template>^(?!\1\s*\S)(?!s*$)</template>
748645 </ends-with>
749646 <subscopes>
647+ <include syntax="self" collection="comments" />
750648 <include syntax="self" collection="definition" />
751649 </subscopes>
752650 </scope>
@@ -786,12 +684,12 @@
786684
787685
788686 <collection name="strings">
789− <scope name="haskell.string.double-quoted">
687+ <scope name="haskell.string.double-quoted" spell-check="true">
790688 <starts-with>
791− <expression>"</expression>
689+ <expression>"</expression>
792690 </starts-with>
793691 <ends-with>
794− <expression>"</expression>
692+ <expression>"</expression>
795693 </ends-with>
796694 <subscopes>
797695 <scope name="haskell.string.escape-sequences">
@@ -828,6 +726,7 @@
828726 </ends-with>
829727 <subscopes>
830728 <scope name="identifier.haskell.type">
729+ <symbol type="expression" />
831730 <symbol type="expression" />
832731 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
833732 <capture number="1" name="identifier.type" />
@@ -852,6 +751,7 @@
852751 </ends-with>
853752 <subscopes>
854753 <scope name="haskell.construct.qualified">
754+ <symbol type="expression" />
855755 <expression>qualified</expression>
856756 <capture number="0" name="haskell.construct.keyword.qualified" />
857757 </scope>
@@ -869,6 +769,7 @@
869769 </ends-with>
870770 <subscopes anchored="true">
871771 <include syntax="self" collection="import-list" />
772+ <symbol type="expression" />
872773 </subscopes>
873774 </scope>
874775
@@ -902,6 +803,7 @@
902803 </ends-with>
903804 <subscopes>
904805 <scope name="haskell.identifier.struct">
806+ <symbol type="expression" />
905807 <symbol type="reference" scope="local" />
906808 <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
907809 <capture number="1" name="haskell.import-list.identifier.type.name" />
@@ -915,13 +817,6 @@
915817 </scope>
916818 </collection>
917819
918− <!-- <collection name="special">
919− <scope>
920− <expression>(;|,)</expression>
921− </scope>
922− </collection> -->
923−
924−
925820 <collection name="reservedop">
926821 <scope name="keyword.operator">
927822 <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
@@ -929,10 +824,11 @@
929824 </collection>
930825
931826 <collection name="keywords">
932− <scope name="haskell.keyword.modifier">
827+ <scope name="haskell.keyword.self">
933828 <symbol type="keyword" />
934829 <strings>
935830 <string>do</string>
831+ <string>mdo</string>
936832 <string>in</string>
937833 <string>infix</string>
938834 <string>infixl</string>
@@ -970,1016 +866,18 @@
970866 <strings>
971867 <string>undefined</string>
972868 <string>_</string>
869+ <string>@</string>
973870 </strings>
974871 </scope>
975872 </collection>
976873
977874 <collection name="comments">
978875 <scope name="haskell.comment.single" spell-check="true">
979− <starts-with>
980− <expression>--</expression>
981− </starts-with>
982− <ends-with>
983− <expression>$</expression>
984− </ends-with>
985− </scope>
986− <scope name="haskell.comment.block" spell-check="true">
987− <starts-with>
988− <expression>{-</expression>
989− </starts-with>
990− <ends-with>
991− <expression>-}</expression>
992− </ends-with>
993− </scope>
994− </collection>
995−
996−
997− </collections>
998−</syntax><?xml version="1.0" encoding="UTF-8"?>
999−<syntax name="haskell">
1000− <meta>
1001− <name>Haskell</name>
1002− <type>compiled</type>
1003− <preferred-file-extension>hs</preferred-file-extension>
1004− </meta>
1005−
1006− <detectors>
1007− <extension priority="1.0">hs</extension>
1008− </detectors>
1009−
1010− <comments>
1011− <single>
1012− <expression>--</expression>
1013− </single>
1014− <multiline>
1015− <starts-with>
1016− <expression>{-</expression>
1017− </starts-with>
1018− <ends-with>
1019− <expression>-}</expression>
1020− </ends-with>
1021− </multiline>
1022− </comments>
1023−
1024− <brackets>
1025− <pair open="{" close="}" />
1026− <pair open="[" close="]" />
1027− <pair open="(" close=")" />
1028− </brackets>
1029−
1030− <surrounding-pairs>
1031− <pair open="[" close="]" />
1032− <pair open="(" close=")" />
1033− <pair open="'" close="'" />
1034− <pair open=""" close=""" />
1035− <pair open="`" close="`" />
1036− </surrounding-pairs>
1037−
1038− <indentation>
1039− <increase>
1040− <expression>
1041− (case|class|do|let|where|=).*
1042− </expression>
1043− </increase>
1044− <decrease>
1045− <expression>^\\s*(end|done|with|in|else)\\b|^\\s*;;</expression>
1046− </decrease>
1047− </indentation>
1048−
1049−
1050− <scopes>
1051− <include syntax="self" collection="comments" />
1052− <include syntax="self" collection="module" />
1053− <include syntax="self" collection="import" />
1054− <include syntax="self" collection="type-family-definition" />
1055− <include syntax="self" collection="pattern-definition" />
1056− <include syntax="self" collection="type-definition" />
1057− <!-- <include syntax="self" collection="type-annotation" /> -->
1058− <include syntax="self" collection="GADT-definition" />
1059− <include syntax="self" collection="instance" />
1060− <include syntax="self" collection="typeclass" />
1061− <include syntax="self" collection="definition" />
1062− </scopes>
1063−
1064− <template-scopes>
1065− <include syntax="self" collection="Quote" />
1066− <include syntax="self" collection="comments" />
1067− </template-scopes>
1068−
1069− <collections>
1070−
1071−
1072− <collection name="operators">
1073− <scope name="keyword.modifier">
1074− <expression>(!|#|\$|%|&|⋆|\+|\.|/|<|=|>|\?|@|\\|\^|\||-|~|:)+</expression>
1075− </scope>
1076− </collection>
1077−
1078− <collection name="expressions">
1079− <include syntax="self" collection="do-bind" />
1080− <include syntax="self" collection="literal" />
1081− <include syntax="self" collection="operators" />
1082− <include syntax="self" collection="list" />
1083− <include syntax="self" collection="lambda-case" />
1084− <include syntax="self" collection="lambda-head" />
1085− <include syntax="self" collection="type-applications" />
1086− <include syntax="self" collection="outer-case-expression" />
1087− <include syntax="self" collection="qvarid" />
1088− <include syntax="self" collection="tuple" />
1089−
1090−
1091− <!-- Needed for do binds -->
1092− <!-- <include syntax="self" collection="pattern-match" /> -->
1093− </collection>
1094−
1095− <collection name="pattern-match">
1096− <include syntax="self" collection="literal" />
1097− <include syntax="self" collection="tuple-match" />
1098− <!-- <include syntax="self" collection="at-pattern" /> -->
1099− <include syntax="self" collection="varid" />
1100− <include syntax="self" collection="qconid" />
1101− <include syntax="self" collection="record-match" />
1102− <include syntax="self" collection="list-pattern" />
1103− <include syntax="self" collection="view-pattern" />
1104− </collection>
1105−
1106− <collection name="type-applications">
1107− <scope name="type-applications">
1108− <starts-with>
1109− <expression>(\s@)\(</expression>
1110− <capture number="1" name="haskell.keyword.operator.typeapplication" />
1111− </starts-with>
1112− <ends-with>
1113− <expression>)</expression>
1114− </ends-with>
1115− <subscopes>
1116− <include syntax="self" collection="type" />
1117− </subscopes>
1118− </scope>
1119− <scope name="type-applications-single">
1120− <expression>(@)(\w+)</expression>
1121− <capture number="1" name="haskell.keyword.operator.typeapplication" />
1122− <capture number="2" name="haskell.identifier.type" />
1123− </scope>
1124− </collection>
1125−
1126− <collection name="Quote">
1127− <scope name="haskell.quasiquote.string-template">
1128− <starts-with>
1129− <expression>\[((?:\w|')+)\|</expression>
1130− <capture number="1" name="haskell.identifier.constant" />
1131− </starts-with>
1132− <ends-with>
1133− <expression>\|\]</expression>
1134− </ends-with>
1135− <subscopes>
1136− <scope name="haskell.quasiquote.string-template.value">
1137− <expression>.+?</expression>
1138− </scope>
1139− </subscopes>
1140− </scope>
1141− </collection>
1142−
1143− <collection name="record-match">
1144− <include syntax="self" collection="qconid" />
1145− <include syntax="self" collection="record-fields-match" />
1146− <include syntax="self" collection="record-fields-match-all" />
1147− </collection>
1148−
1149−
1150− <collection name="record-fields-match">
1151− <scope name="record-fields-match">
1152− <symbol type="expression" />
1153− <starts-with>
1154− <expression>(\{)</expression>
1155− <capture number="1" name="haskell.pattern.record.bracket" />
1156− </starts-with>
1157− <ends-with>
1158− <expression>(\})</expression>
1159− <capture number="1" name="haskell.pattern.record.bracket" />
1160− </ends-with>
1161− <subscopes>
1162− <include syntax="self" collection="pattern-match" />
1163− <include syntax="self" collection="varid" />
1164− <scope name="record-sep">
1165− <expression>=</expression>
1166− </scope>
1167− <scope name="record-sep">
1168− <expression>,</expression>
1169− </scope>
1170− </subscopes>
1171− </scope>
1172− </collection>
1173−
1174− <collection name="record-fields-match-wildcard">
1175− <scope name="record-fields-match-all">
1176− <starts-with>
1177− <expression>(\{)</expression>
1178− <capture number="1" name="haskell.pattern.record.bracket" />
1179− </starts-with>
1180− <ends-with>
1181− <expression>(\})</expression>
1182− <capture number="1" name="haskell.pattern.record.bracket" />
1183− </ends-with>
1184− <subscopes>
1185− <scope name="haskell.pattern.record.wildcard">
1186− <expression>\.\.</expression>
1187− </scope>
1188− </subscopes>
1189− </scope>
1190− </collection>
1191−
1192− <collection name="bind-arrow">
1193− <scope name="haskell.operator.bind-arrow">
1194− <expression><-</expression>
1195− </scope>
1196− </collection>
1197−
1198−
1199− <collection name="list">
1200− <symbol type="expression" />
1201− <scope name="haskell.list">
1202− <starts-with>
1203− <expression>(\[)</expression>
1204− <capture number="1" name="haskell.list.bracket" />
1205− </starts-with>
1206− <ends-with>
1207− <expression>(\])</expression>
1208− <capture number="1" name="haskell.list.bracket" />
1209− </ends-with>
1210− <subscopes>
1211− <include syntax="self" collection="expressions" />
1212− </subscopes>
1213− </scope>
1214− </collection>
1215−
1216− <collection name="list-pattern">
1217− <symbol type="expression" />
1218− <scope name="haskell.pattern.list">
1219− <starts-with>
1220− <expression>(\[)</expression>
1221− <capture number="1" name="haskell.pattern.list.bracket" />
1222− </starts-with>
1223− <ends-with>
1224− <expression>(\])</expression>
1225− <capture number="1" name="haskell.pattern.list.bracket" />
1226− </ends-with>
1227− <subscopes>
1228− <include syntax="self" collection="pattern-match" />
1229− </subscopes>
1230− </scope>
1231− </collection>
1232−
1233−
1234− <collection name="view-pattern">
1235− <scope name="haskell.pattern.view">
1236− <symbol type="expression" />
1237− <starts-with>
1238− <expression>(\()</expression>
1239− <capture number="1" name="haskell.pattern.view.bracket" />
1240− </starts-with>
1241− <ends-with>
1242− <expression>(\))</expression>
1243− <capture number="1" name="haskell.pattern.view.bracket" />
1244− </ends-with>
1245− <subscopes anchored="true">
1246− <include syntax="self" collection="expressions" />
1247− <scope name="haskell.pattern.view.operator.arrow">
1248− <expression>-></expression>
1249− </scope>
1250− <include syntax="self" collection="pattern-match" />
1251− </subscopes>
1252− </scope>
1253− </collection>
1254−
1255− <collection name="tuple-match">
1256− <symbol type="expression" />
1257− <scope name="haskell.pattern.tuple">
1258− <starts-with>
1259− <expression>(\()</expression>
1260− <capture number="1" name="haskell.pattern.tuple.bracket" />
1261− </starts-with>
1262− <ends-with>
1263− <expression>(\))</expression>
1264− <capture number="1" name="haskell.pattern.tuple.bracket" />
1265− </ends-with>
1266− <subscopes>
1267− <include syntax="self" collection="pattern-match" />
1268− </subscopes>
1269− </scope>
1270− </collection>
1271−
1272− <collection name="case-expression">
1273− <scope name="haskell.case">
1274− <starts-with>
1275− <expression>(case)</expression>
1276− <capture number="1" name="haskell.case.keyword.condition" />
1277− </starts-with>
1278− <ends-with>
1279− <expression>(of)</expression>
1280− <capture number="1" name="haskell.case.keyword.condition" />
1281− </ends-with>
1282− <subscopes anchored="true">
1283− <include syntax="self" collection="pattern-match" />
1284− </subscopes>
1285− </scope>
1286− </collection>
1287−
1288− <collection name="case-match">
1289− <scope name="case-match">
1290− <starts-with>
1291− <expression>(?=((\h*)\S.*->($|\h)))</expression>
1292− </starts-with>
1293− <ends-with>
1294− <expression>-></expression>
1295− </ends-with>
1296− <subscopes anchored="true">
1297− <include syntax="self" collection="pattern-match" />
1298− </subscopes>
1299− </scope>
1300− </collection>
1301−
1302− <collection name="inner-case-expressions">
1303− <scope name="inner-case-expressions">
1304− <starts-with>
1305− <expression>(?=((\h*)\S.*->($|\h)))</expression>
1306− </starts-with>
1307− <ends-with>
1308− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
1309− </ends-with>
1310− <subscopes>
1311− <include syntax="self" collection="case-match" />
1312− <include syntax="self" collection="expressions" />
1313− </subscopes>
1314− </scope>
1315− </collection>
1316−
1317− <collection name="outer-case-expression">
1318− <scope name="outer-case-expression">
1319− <starts-with>
1320− <expression>(?=case)</expression>
1321− </starts-with>
1322− <ends-with />
1323− <subscopes anchored="true" skip-whitespace="false">
1324− <include syntax="self" collection="case-expression" />
1325− <include syntax="self" collection="inner-case-expressions" repeat="true" />
1326− </subscopes>
1327− </scope>
1328− </collection>
1329−
1330− <collection name="tuple">
1331− <symbol type="expression" />
1332− <scope name="haskell.tuple">
1333− <starts-with>
1334− <expression>(\()</expression>
1335− <capture number="1" name="haskell.tuple.bracket" />
1336− </starts-with>
1337− <ends-with>
1338− <expression>(\))</expression>
1339− <capture number="1" name="haskell.tuple.bracket" />
1340− </ends-with>
1341− <subscopes>
1342− <include syntax="self" collection="expressions" />
1343− </subscopes>
1344− </scope>
1345− </collection>
1346−
1347− <collection name="typeclass">
1348− <symbol type="interface" />
1349− <scope name="haskell.definition.class">
1350− <starts-with>
1351− <expression>^(\h*)(class)($|\h)</expression>
1352− <capture number="2" name="haskell.keyword.construct.class" />
1353− </starts-with>
1354− <ends-with>
1355− <template>^(?!\s+\1\S)(?!\s*$)</template>
1356− </ends-with>
1357− <subscopes>
1358− <scope name="haskell.keyword.construct.where">
1359− <expression>where</expression>
1360− </scope>
1361− <include syntax="self" collection="type" />
1362− <include syntax="self" collection="type-definition" />
1363− <!-- <include syntax="self" collection="type-annotation" /> -->
1364− <include syntax="self" collection="definition" />
1365− </subscopes>
1366− </scope>
1367− </collection>
1368−
1369− <collection name="instance">
1370− <scope name="haskell.instance">
1371− <symbol type="category" />
1372− <starts-with>
1373− <expression>^(\h*)(instance)($|\h)</expression>
1374− <capture number="2" name="haskell.keyword.construct.instance" />
1375− </starts-with>
1376− <ends-with>
1377− <template>^(?!\s+\1\S)(?!\s*$)</template>
1378− </ends-with>
1379− <subscopes>
1380− <scope name="haskell.keyword.construct.where">
1381− <expression>where</expression>
1382− </scope>
1383− <include syntax="self" collection="type" />
1384− <include syntax="self" collection="type-definition" />
1385− <include syntax="self" collection="type-annotation" />
1386− <include syntax="self" collection="definition" />
1387− </subscopes>
1388− </scope>
1389− </collection>
1390−
1391− <collection name="type-family-definition">
1392− <scope name="haskell.definition.type-family.type">
1393− <symbol type="type">
1394− <context behavior="subtree" foldable="false" />
1395− </symbol>
1396− <starts-with>
1397− <expression>^(\h*)(type\h+family)</expression>
1398− <capture number="2" name="haskell.keyword.construct.type-family" />
1399− </starts-with>
1400− <ends-with>
1401− <template>^(?!\s+\1\S)(?!\s*$)</template>
1402− </ends-with>
1403− <subscopes anchored="true" skip-whitespace="false">
1404− <scope name="haskell.type-family.head">
1405− <starts-with>
1406− <expression></expression>
1407− </starts-with>
1408− <ends-with>
1409− <expression>where</expression>
1410− <capture number="0" name="haskell.keyword.construct.where" />
1411− </ends-with>
1412− <subscopes anchored="true">
1413− <scope name="haskell.identifier.type-family.type.name">
1414− <expression>\S+</expression>
1415− </scope>
1416− <include syntax="self" collection="type" repeat="true" optional="true" />
1417− </subscopes>
1418− </scope>
1419−
1420− <include syntax="self" collection="type-family-case-definition" optional="true" repeat="true" />
1421− </subscopes>
1422− </scope>
1423− </collection>
1424−
1425− <collection name="type-family-case-definition">
1426− <scope name="haskell.definition.type-family.type.case">
1427− <starts-with>
1428− <expression>^(\h*)(?=\S)</expression>
1429− </starts-with>
1430− <ends-with>
1431− <template>^(?!\s+\1\S)(?!\s*$)</template>
1432− </ends-with>
1433− <subscopes>
1434− <include syntax="self" collection="type" optional="true" repeat="true" />
1435− <scope>
1436− <expression>=</expression>
1437− </scope>
1438− <include syntax="self" collection="type" optional="true" repeat="true" />
1439− </subscopes>
1440− </scope>
1441− </collection>
1442−
1443− <collection name="definition">
1444− <scope name="haskell.definition.type.function">
1445− <symbol type="function">
1446− <display-name>
1447− <component selector="haskell.definition.type.function" />
1448− </display-name>
1449−
1450− </symbol>
1451− <starts-with>
1452− <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
1453− <capture number="2" name="haskell.keyword.construct.default" />
1454− <capture number="3" name="haskell.identifier.function" />
1455− </starts-with>
1456− <ends-with>
1457− <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
1458− </ends-with>
1459− <subscopes>
1460− <include syntax="self" collection="type-annotation" />
1461− <include syntax="self" collection="implementation" />
1462− </subscopes>
1463− </scope>
1464− </collection>
1465−
1466− <collection name="do-bind">
1467− <scope name="do-bind">
1468− <starts-with>
1469− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
1470− </starts-with>
1471− <ends-with>
1472− <template>^(?!\1)(?!\2\h)(?!\s*$)</template>
1473− </ends-with>
1474− <subscopes>
1475− <include syntax="self" collection="do-pattern" />
1476− <include syntax="self" collection="expressions" />
1477− <!-- <scope name="bind-arrow">
1478− <expression><-</expression>
1479− </scope> -->
1480− </subscopes>
1481− </scope>
1482− </collection>
1483−
1484− <collection name="do-pattern">
1485− <scope name="do-pattern">
1486− <starts-with>
1487− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
1488− </starts-with>
1489− <ends-with>
1490− <expression><-</expression>
1491− </ends-with>
1492− <subscopes>
1493− <include syntax="self" collection="pattern-match" />
1494− <!-- <scope name="bind-arrow">
1495− <expression><-</expression>
1496− </scope>
1497− <include syntax="self" collection="expressions" repeat="true" /> -->
1498− </subscopes>
1499− </scope>
1500− </collection>
1501−
1502− <collection name="implementation">
1503− <scope name="haskell.definition.type.function">
1504− <local scope="within-construct" />
1505− <starts-with>
1506− <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
1507− <capture number="2" name="haskell.keyword.construct.default" />
1508− <capture number="3" name="haskell.identifier.function" />
1509− </starts-with>
1510− <ends-with>
1511− <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
1512− </ends-with>
1513− <subscopes>
1514− <include syntax="self" collection="where-clause" />
1515− <include syntax="self" collection="expressions" />
1516− </subscopes>
1517− </scope>
1518− </collection>
1519−
1520− <collection name="type-annotation">
1521− <scope name="haskell.definition.type.function">
1522− <starts-with>
1523− <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
1524− <capture number="2" name="haskell.identifier.function" />
1525− </starts-with>
1526− <ends-with>
1527− <template>^(?!\s+\1\S)(?!\s*$)</template>
1528− </ends-with>
1529− <subscopes>
1530− <include syntax="self" collection="type" />
1531− </subscopes>
1532− </scope>
1533− </collection>
1534−
1535− <collection name="type-definition">
1536− <scope name="haskell.definition.type">
1537− <starts-with>
1538− <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
1539− <capture number="2" name="haskell.keyword.construct.type" />
1540− <capture number="3" name="haskell.identifier.type" />
1541− </starts-with>
1542− <ends-with>
1543− <template>^(?!\s+\1\S)(?!\s*$)</template>
1544− </ends-with>
1545− <subscopes>
1546− <include syntax="self" collection="type" />
1547− </subscopes>
1548− </scope>
1549− </collection>
1550−
1551− <collection name="GADT-definition">
1552− <scope name="haskell.definition.struct.GADT">
1553− <symbol type="struct">
1554− <context behavior="subtree" foldable="false" />
1555− </symbol>
1556− <starts-with>
1557− <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
1558− <capture number="2" name="haskell.keyword.construct.data.GADT" />
1559− <capture number="3" name="haskell.identifier.data.type.name" />
1560− </starts-with>
1561− <ends-with>
1562− <template>^(?!\s+\1\S)(?!\s*$)</template>
1563− </ends-with>
1564− <subscopes>
1565− <scope name="haskell.keyword.construct.where">
1566− <expression>where</expression>
1567− </scope>
1568−
1569− <include syntax="self" collection="deriving-clause" />
1570− <include syntax="self" collection="record-definition" />
1571− <include syntax="self" collection="gadt-constructor" />
1572− <include syntax="self" collection="type" />
1573− </subscopes>
1574− </scope>
1575− </collection>
1576−
1577− <collection name="gadt-constructor">
1578− <scope name="haskell.identifier.type.struct.data.constructor">
1579− <symbol type="constructor">
1580− <context behavior="whitespace" />
1581− </symbol>
1582− <expression>(^|=|\|)\h+([A-Z](\w|')*)</expression>
1583− <capture number="2" name="haskell.identifier.data.name" />
1584− </scope>
1585− <scope name="identifier.type.struct.GADT.constructor">
1586− <symbol type="constructor"></symbol>
1587− <expression>^\h+([A-Z](\w|')*)</expression>
1588− <capture number="1" name="haskell.identifier.data.name" />
1589− </scope>
1590− </collection>
1591−
1592− <collection name="deriving-clause">
1593− <scope name="haskell.record.construct.deriving.keyword">
1594− <expression>deriving\h+(newtype|stock|anyclass)</expression>
1595− </scope>
1596− </collection>
1597−
1598− <collection name="record-definition">
1599− <scope name="haskell.record">
1600− <symbol>
1601− <context behavior="subtree" foldable="true" />
1602− </symbol>
1603− <starts-with>
1604− <expression>(?=\{)</expression>
1605− <capture number="0" name="haskell.record.bracket" />
1606− </starts-with>
1607− <ends-with>
1608− <expression>(\})</expression>
1609− <capture number="1" name="haskell.record.bracket" />
1610− </ends-with>
1611− <subscopes>
1612− <include syntax="self" collection="record-definition-field-name" />
1613− <include syntax="self" collection="type" />
1614− </subscopes>
1615− </scope>
1616− </collection>
1617−
1618− <collection name="record-definition-field-name">
1619− <scope name="haskell.record.definition.property">
1620− <symbol type="property" />
1621− <expression>(((?![A-Z])\w(\w|')*)\h*::|(^|\{|,)\h*((?![A-Z])\w(\w|')*))</expression>
1622− <capture number="5" name="haskell.record.definition.property.field.property.name" />
1623− <capture number="2" name="haskell.record.definition.property.field.property.name" />
1624− </scope>
1625− </collection>
1626−
1627− <collection name="type">
1628− <scope name="haskell.type.construct.tuple">
1629− <starts-with>
1630− <expression>\(</expression>
1631− </starts-with>
1632− <ends-with>
1633− <expression>\)</expression>
1634− </ends-with>
1635− <subscopes>
1636− <scope name="haskell.construct.type.typle.comma">
1637− <expression>\,</expression>
1638− </scope>
1639− <include syntax="self" collection="type" />
1640− </subscopes>
1641− </scope>
1642− <scope name="haskell.type.list">
1643− <starts-with>
1644− <expression>'?\[</expression>
1645− </starts-with>
1646− <ends-with>
1647− <expression>\]</expression>
1648− </ends-with>
1649− <subscopes>
1650− <include syntax="self" collection="type" />
1651− </subscopes>
1652− </scope>
1653− <scope name="haskell.type.star">
1654− <expression>\*</expression>
1655− </scope>
1656− <scope name="haskell.keyword.construct.type-annotation-operator">
1657− <expression>::</expression>
1658− </scope>
1659− <include syntax="self" collection="type-list" />
1660− <scope>
1661− <expression>(([A-Z](\w|')*\.)*)'*([A-Z](\w|')*)</expression>
1662− <capture number="1" name="haskell.identifier.package.module" />
1663− <capture number="4" name="haskell.identifier.type" />
1664− </scope>
1665− <scope name="haskell.keyword.construct.forall">
1666− <expression>forall</expression>
1667− </scope>
1668− <scope name="haskell.identifier.type.variable">
1669− <expression>(?!=)((?!(\(|\)|\,))\S)((?!(\(|\)|\,))\S)*</expression>
1670− </scope>
1671− <scope name="haskell.keyword.construct.function-arrow">
1672− <expression>-></expression>
1673− </scope>
1674− <scope name="haskell.keyword.construct.fat-arrow">
1675− <expression>=></expression>
1676− </scope>
1677− </collection>
1678−
1679− <collection name="pattern-definition">
1680− <scope name="haskell.pattern">
1681− <starts-with>
1682− <expression>^(\h*)(pattern)\h+(\w(\w|')*)</expression>
1683− <capture number="2" name="haskell.keyword.construct.pattern" />
1684− <capture number="3" name="haskell.identifier.decorator.pattern" />
1685− </starts-with>
1686− <ends-with>
1687− <template>^(?!\s+\1\S)(?!\s*$)</template>
1688− </ends-with>
1689− <subscopes>
1690− <scope name="haskell.keyword.construct.where">
1691− <expression>where</expression>
1692− </scope>
1693− <include syntax="self" collection="expressions" />
1694− </subscopes>
1695− </scope>
1696− </collection>
1697−
1698− <collection name="type-list">
1699− <scope name="haskell.type-list">
1700− <starts-with>
1701− <expression>('\[)</expression>
1702− <capture number="1" name="haskell.type-list.bracket" />
1703− </starts-with>
1704− <ends-with>
1705− <expression>(\])</expression>
1706− <capture number="1" name="haskell.type-list.bracket" />
1707− </ends-with>
1708− <subscopes>
1709− <include syntax="self" collection="type" />
1710− </subscopes>
1711− </scope>
1712− </collection>
1713−
1714− <collection name="lambda-head">
1715− <scope name="haskell.lambda">
1716− <starts-with>
1717− <expression>(\\)</expression>
1718− <capture number="1" name="haskell.keyword.construct.lambda" />
1719− </starts-with>
1720− <ends-with>
1721− <expression>(->)</expression>
1722− <capture number="1" name="haskell.keyword.construct.lambda" />
1723− </ends-with>
1724− <subscopes>
1725− <include syntax="self" collection="pattern-match" />
1726− </subscopes>
1727− </scope>
1728− </collection>
1729−
1730− <collection name="lambda-case">
1731− <scope name="haskell.keyword.condition.lambda-case">
1732− <expression>\\case</expression>
1733− </scope>
1734− </collection>
1735−
1736− <collection name="where-clause">
1737− <scope name="haskell.construct.where">
1738− <local scope="within-parent" />
1739− <starts-with>
1740− <expression>^(\h*)(where)</expression>
1741− <capture number="2" name="haskell.construct.keyword.where" />
1742− </starts-with>
1743− <ends-with>
1744− <template>^(?!\1\s*\S)(?!s*$)</template>
1745− </ends-with>
1746− <subscopes>
1747− <include syntax="self" collection="definition" />
1748− </subscopes>
1749− </scope>
1750− </collection>
1751−
1752−
1753− <collection name="qvarid">
1754− <scope name="haskell.identifier.function">
1755− <expression>(([A-Z](\w|')*\.)*)(\w(\w|')*)</expression>
1756− <capture number="1" name="haskell.identifier.package.module" />
1757− <capture number="4" name="haskell.identifier.type" />
1758− </scope>
1759− </collection>
1760−
1761− <collection name="varid">
1762− <scope name="haskell.identifier.variable">
1763− <expression>\w(\w|')*</expression>
1764− </scope>
1765− </collection>
1766−
1767− <collection name="qconid">
1768− <scope name="haskell.identifier.type.struct.constructor">
1769− <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
1770− </scope>
1771− </collection>
1772−
1773− <collection name="qconsym">
1774− <scope name="haskell.identifier.decorator.pattern">
1775− <expression>([A-Z](\w|')*\.):(\w|')*</expression>
1776− </scope>
1777− </collection>
1778−
1779− <collection name="literal">
1780− <include syntax="self" collection="number" />
1781− <include syntax="self" collection="strings" />
1782− </collection>
1783−
1784−
1785− <collection name="strings">
1786− <scope name="haskell.string.double-quoted">
1787− <starts-with>
1788− <expression>"</expression>
1789− </starts-with>
1790− <ends-with>
1791− <expression>"</expression>
1792− </ends-with>
1793− <subscopes>
1794− <scope name="haskell.string.escape-sequences">
1795− <expression>\\.</expression>
1796− </scope>
1797− </subscopes>
1798− </scope>
1799− <scope name="haskell.string.single-quoted">
1800− <expression>'([^'\\]|\\.)'</expression>
1801− </scope>
1802− </collection>
1803−
1804−
1805− <collection name="number">
1806− <scope name="haskell.value.number">
1807− <expression>(0x|0o|0O|0X)?\d+(\d|_)*(\.[\d|_]+)?((e|E)(\+|-)?\d+)?</expression>
1808− </scope>
1809− </collection>
1810−
1811−
1812− <collection name="module">
1813− <scope name="haskell.definition.module.package">
1814− <symbol type="package">
1815− <context behavior="subtree" foldable="true" export-local="true" />
1816− </symbol>
1817− <starts-with>
1818− <expression>^(module)\s+((\w|\.)+)</expression>
1819− <capture number="1" name="haskell.construct.keyword.module" />
1820− <capture number="2" name="haskell.definition.module.package" />
1821− </starts-with>
1822− <ends-with>
1823− <expression>(where)</expression>
1824− <capture number="1" name="haskell.construct.keyword.module" />
1825− </ends-with>
1826− <subscopes>
1827− <scope name="identifier.haskell.type">
1828− <symbol type="expression" />
1829− <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
1830− <capture number="1" name="identifier.type" />
1831− </scope>
1832− <scope name="identifier.variable">
1833− <symbol type="expression" />
1834− <expression>(\w|')+</expression>
1835− <capture number="0" name="identifier.haskell.function" />
1836− </scope>
1837− </subscopes>
1838− </scope>
1839− </collection>
1840−
1841− <collection name="import">
1842− <scope name="haskell.construct.import">
1843− <starts-with>
1844− <expression>^(import)\s</expression>
1845− <capture number="1" name="haskell.construct.keyword.import" />
1846− </starts-with>
1847− <ends-with>
1848− <expression>(?=^\S)</expression>
1849− </ends-with>
1850− <subscopes>
1851− <scope name="haskell.construct.qualified">
1852− <expression>qualified</expression>
1853− <capture number="0" name="haskell.construct.keyword.qualified" />
1854− </scope>
1855−
1856− <scope name="haskell.construct.hiding">
1857− <symbol type="keyword">
1858− <context behavior="subtree" />
1859− </symbol>
1860− <starts-with>
1861− <expression>(hiding)\h*(?=\()</expression>
1862− <capture number="1" name="haskell.construct.keyword.hiding" />
1863− </starts-with>
1864− <ends-with>
1865− <expression>(?=\))</expression>
1866− </ends-with>
1867− <subscopes anchored="true">
1868− <include syntax="self" collection="import-list" />
1869− </subscopes>
1870− </scope>
1871−
1872− <scope name="haskell.construct.keyword.as">
1873− <symbol type="package" />
1874− <expression>as(\h+([A-Z]\w*))?</expression>
1875− <capture number="2" name="haskell.package.qualified.name" />
1876− </scope>
1877− <scope name="haskell.identifier.module.package">
1878− <symbol type="package" />
1879− <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
1880− <capture number="0" name="haskell.package.name" />
1881− </scope>
1882− <include syntax="self" collection="import-list" />
1883− </subscopes>
1884− </scope>
1885− </collection>
1886−
1887− <collection name="import-list">
1888− <scope name="import-list">
1889− <symbol>
1890− <context behavior="subtree" export-local="true" />
1891− </symbol>
1892− <starts-with>
1893− <expression>(\()</expression>
1894− <capture number="1" name="haskell.import-list.bracket" />
1895− </starts-with>
1896− <ends-with>
1897− <expression>(\))</expression>
1898− <capture number="1" name="haskell.import-list.bracket" />
1899− </ends-with>
1900− <subscopes>
1901− <scope name="haskell.identifier.struct">
1902− <symbol type="reference" scope="local" />
1903− <expression>([A-Z](\w|')*)\h*(\(\h*\.\.\h*\))?</expression>
1904− <capture number="1" name="haskell.import-list.identifier.type.name" />
1905− </scope>
1906− <scope name="haskell.identifier.function">
1907− <symbol type="reference" scope="local" />
1908− <expression>(\w|')+</expression>
1909− <capture number="0" name="haskell.import-list.function.name" />
1910− </scope>
1911− </subscopes>
1912− </scope>
1913− </collection>
1914−
1915− <!-- <collection name="special">
1916− <scope>
1917− <expression>(;|,)</expression>
1918− </scope>
1919− </collection> -->
1920−
1921−
1922− <collection name="reservedop">
1923− <scope name="keyword.operator">
1924− <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
1925− </scope>
1926− </collection>
1927−
1928− <collection name="keywords">
1929− <scope name="haskell.keyword.modifier">
1930− <symbol type="keyword" />
1931− <strings>
1932− <string>do</string>
1933− <string>in</string>
1934− <string>infix</string>
1935− <string>infixl</string>
1936− <string>infixr</string>
1937− <string>where</string>
1938− <string>let</string>
1939− </strings>
1940− </scope>
1941− <scope name="haskell.keyword.condition">
1942− <symbol type="keyword" />
1943− <strings>
1944− <string>of</string>
1945− <string>case</string>
1946− <string>else</string>
1947− <string>if</string>
1948− <string>then</string>
1949− </strings>
1950− </scope>
1951− <scope name="haskell.keyword.keyword.construct">
1952− <symbol type="keyword" />
1953− <strings>
1954− <string>instance</string>
1955− <string>module</string>
1956− <string>type</string>
1957− <string>class</string>
1958− <string>data</string>
1959− <string>default</string>
1960− <string>deriving</string>
1961− <string>foreign</string>
1962− </strings>
1963− </scope>
1964− <scope name="haskell.keyword.self">
1965− <symbol type="keyword" />
1966− <strings>
1967− <string>undefined</string>
1968− <string>_</string>
1969− </strings>
1970− </scope>
1971− </collection>
1972−
1973− <collection name="comments">
1974− <scope name="haskell.comment.single" spell-check="true">
1975− <starts-with>
1976− <expression>--</expression>
1977− </starts-with>
1978− <ends-with>
1979− <expression>$</expression>
1980− </ends-with>
876+ <symbol type="comment" />
877+ <expression> --.*$</expression>
1981878 </scope>
1982879 <scope name="haskell.comment.block" spell-check="true">
880+ <symbol type="comment" />
1983881 <starts-with>
1984882 <expression>{-</expression>
1985883 </starts-with>
@@ -1991,4 +889,4 @@
1991889
1992890
1993891 </collections>
1994−</syntax>
892+</syntax>