@@ -0,0 +1,821 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<syntax name="haskell">
3+ <meta>
4+ <name>Haskell</name>
5+ <type>compiled</type>
6+ <preferred-file-extension>hs</preferred-file-extension>
7+ </meta>
8+
9+ <detectors>
10+ <extension priority="1.0">hs</extension>
11+ </detectors>
12+
13+ <comments>
14+ <single>
15+ <expression>--</expression>
16+ </single>
17+ <multiline>
18+ <starts-with>
19+ <expression>{-</expression>
20+ </starts-with>
21+ <ends-with>
22+ <expression>-}</expression>
23+ </ends-with>
24+ </multiline>
25+ </comments>
26+
27+ <brackets>
28+ <pair open="{" close="}" />
29+ <pair open="[" close="]" />
30+ <pair open="(" close=")" />
31+ </brackets>
32+
33+ <surrounding-pairs>
34+ <pair open="[" close="]" />
35+ <pair open="(" close=")" />
36+ <pair open="'" close="'" />
37+ <pair open=""" close=""" />
38+ <pair open="`" close="`" />
39+ </surrounding-pairs>
40+
41+ <indentation>
42+ <increase>
43+ <expression>
44+ (case|class|do|let|where).*
45+ </expression>
46+ </increase>
47+ <decrease>
48+ <expression>^\\s*(end|done|with|in|else)\\b|^\\s*;;</expression>
49+ </decrease>
50+ </indentation>
51+
52+
53+ <scopes>
54+ <include syntax="self" collection="comments" />
55+ <include syntax="self" collection="module" />
56+ <include syntax="self" collection="import" />
57+ <include syntax="self" collection="type-family-definition" />
58+ <include syntax="self" collection="pattern-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" />
63+ <include syntax="self" collection="instance" />
64+ <include syntax="self" collection="typeclass" />
65+ <include syntax="self" collection="definition" />
66+ </scopes>
67+
68+ <template-scopes>
69+ <include syntax="self" collection="Quote" />
70+ <include syntax="self" collection="comments" />
71+ </template-scopes>
72+
73+ <collections>
74+
75+
76+ <collection name="operators">
77+ <scope name="keyword.modifier">
78+ <expression>(!|#|\$|%|&|โ|\+|\.|/|<|=|>|\?|@|\\|\^|\||-|~|:)+</expression>
79+ </scope>
80+ </collection>
81+
82+ <collection name="expressions">
83+ <include syntax="self" collection="do-bind" />
84+ <include syntax="self" collection="literal" />
85+ <include syntax="self" collection="operators" />
86+ <include syntax="self" collection="list" />
87+ <include syntax="self" collection="lambda-case" />
88+ <include syntax="self" collection="lambda-head" />
89+ <include syntax="self" collection="type-applications" />
90+ <include syntax="self" collection="case-expression" />
91+ <include syntax="self" collection="qvarid" />
92+ <include syntax="self" collection="bind-arrow" />
93+ <include syntax="self" collection="tuple" />
94+
95+
96+
97+ <!-- Needed for do binds -->
98+ <!-- <include syntax="self" collection="pattern-match" /> -->
99+ </collection>
100+
101+ <collection name="pattern-match">
102+ <include syntax="self" collection="literal" />
103+ <include syntax="self" collection="view-pattern" />
104+ <include syntax="self" collection="tuple-match" />
105+<!-- <include syntax="self" collection="at-pattern" /> -->
106+ <include syntax="self" collection="varid" />
107+ <include syntax="self" collection="qconid" />
108+ <include syntax="self" collection="record-match" />
109+ <include syntax="self" collection="list-pattern" />
110+ </collection>
111+
112+ <collection name="type-applications">
113+ <scope name="type-applications">
114+ <starts-with>
115+ <expression>(\s@)\(</expression>
116+ <capture number="1" name="haskell.keyword.operator.typeapplication" />
117+ </starts-with>
118+ <ends-with>
119+ <expression>)</expression>
120+ </ends-with>
121+ <subscopes>
122+ <include syntax="self" collection="type" />
123+ </subscopes>
124+ </scope>
125+ <scope name="type-applications-single">
126+ <expression>(@)(\w+)</expression>
127+ <capture number="1" name="haskell.keyword.operator.typeapplication" />
128+ <capture number="2" name="haskell.identifier.type" />
129+ </scope>
130+ </collection>
131+
132+ <collection name="Quote">
133+ <scope name="haskell.quasiquote.string-template">
134+ <starts-with>
135+ <expression>\[((?:\w|')+)\|</expression>
136+ <capture number="1" name="haskell.identifier.constant" />
137+ </starts-with>
138+ <ends-with>
139+ <expression>\|\]</expression>
140+ </ends-with>
141+ <subscopes>
142+ <scope name="haskell.quasiquote.string-template.value">
143+ <expression>.+?</expression>
144+ </scope>
145+ </subscopes>
146+ </scope>
147+ </collection>
148+
149+ <collection name="record-match">
150+ <include syntax="self" collection="qconid" />
151+ <include syntax="self" collection="record-fields-match" />
152+ <include syntax="self" collection="record-fields-match-all" />
153+ </collection>
154+
155+
156+ <collection name="record-fields-match">
157+ <scope name="record-fields-match">
158+ <symbol type="expression" />
159+ <starts-with>
160+ <expression>(\{)</expression>
161+ <capture number="1" name="haskell.pattern.record.bracket" />
162+ </starts-with>
163+ <ends-with>
164+ <expression>(\})</expression>
165+ <capture number="1" name="haskell.pattern.record.bracket" />
166+ </ends-with>
167+ <subscopes>
168+ <include syntax="self" collection="pattern-match" />
169+ <include syntax="self" collection="varid" />
170+ <scope name="record-sep">
171+ <expression>=</expression>
172+ </scope>
173+ <scope name="record-sep">
174+ <expression>,</expression>
175+ </scope>
176+ </subscopes>
177+ </scope>
178+ </collection>
179+
180+ <collection name="record-fields-match-wildcard">
181+ <scope name="record-fields-match-all">
182+ <starts-with>
183+ <expression>(\{)</expression>
184+ <capture number="1" name="haskell.pattern.record.bracket" />
185+ </starts-with>
186+ <ends-with>
187+ <expression>(\})</expression>
188+ <capture number="1" name="haskell.pattern.record.bracket" />
189+ </ends-with>
190+ <subscopes>
191+ <scope name="haskell.pattern.record.wildcard">
192+ <expression>\.\.</expression>
193+ </scope>
194+ </subscopes>
195+ </scope>
196+ </collection>
197+
198+ <collection name="bind-arrow">
199+ <scope name="haskell.operator.bind-arrow">
200+ <expression><-</expression>
201+ </scope>
202+ </collection>
203+
204+
205+ <collection name="list">
206+ <symbol type="expression" />
207+ <scope name="haskell.list">
208+ <starts-with>
209+ <expression>(\[)</expression>
210+ <capture number="1" name="haskell.list.bracket" />
211+ </starts-with>
212+ <ends-with>
213+ <expression>(\])</expression>
214+ <capture number="1" name="haskell.list.bracket" />
215+ </ends-with>
216+ <subscopes>
217+ <include syntax="self" collection="expressions" />
218+ </subscopes>
219+ </scope>
220+ </collection>
221+
222+ <collection name="list-pattern">
223+ <symbol type="expression" />
224+ <scope name="haskell.pattern.list">
225+ <starts-with>
226+ <expression>(\[)</expression>
227+ <capture number="1" name="haskell.pattern.list.bracket" />
228+ </starts-with>
229+ <ends-with>
230+ <expression>(\])</expression>
231+ <capture number="1" name="haskell.pattern.list.bracket" />
232+ </ends-with>
233+ <subscopes>
234+ <include syntax="self" collection="pattern-match" />
235+ </subscopes>
236+ </scope>
237+ </collection>
238+
239+
240+ <collection name="view-pattern">
241+ <scope name="haskell.pattern.view">
242+ <symbol type="expression" />
243+ <starts-with>
244+ <expression>(\()</expression>
245+ <capture number="1" name="haskell.pattern.view.bracket" />
246+ </starts-with>
247+ <ends-with>
248+ <expression>(\))</expression>
249+ <capture number="1" name="haskell.pattern.view.bracket" />
250+ </ends-with>
251+ <subscopes anchored="true">
252+ <include syntax="self" collection="expressions" />
253+ <scope name="haskell.pattern.view.operator.arrow">
254+ <expression>-></expression>
255+ </scope>
256+ <include syntax="self" collection="pattern-match" />
257+ </subscopes>
258+ </scope>
259+ </collection>
260+
261+ <collection name="tuple-match">
262+ <symbol type="expression" />
263+ <scope name="haskell.pattern.tuple">
264+ <starts-with>
265+ <expression>(\()</expression>
266+ <capture number="1" name="haskell.pattern.tuple.bracket" />
267+ </starts-with>
268+ <ends-with>
269+ <expression>(\))</expression>
270+ <capture number="1" name="haskell.pattern.tuple.bracket" />
271+ </ends-with>
272+ <subscopes>
273+ <include syntax="self" collection="pattern-match" />
274+ </subscopes>
275+ </scope>
276+ </collection>
277+
278+ <collection name="case-expression">
279+ <scope name="haskell.case">
280+ <starts-with>
281+ <expression>(case)</expression>
282+ <capture number="1" name="haskell.case.keyword.condition" />
283+ </starts-with>
284+ <ends-with>
285+ <expression>(of)</expression>
286+ <capture number="1" name="haskell.case.keyword.condition" />
287+ </ends-with>
288+ <subscopes>
289+ <include syntax="self" collection="expressions" />
290+ </subscopes>
291+ </scope>
292+ </collection>
293+
294+ <collection name="tuple">
295+ <symbol type="expression" />
296+ <scope name="haskell.tuple">
297+ <starts-with>
298+ <expression>(\()</expression>
299+ <capture number="1" name="haskell.tuple.bracket" />
300+ </starts-with>
301+ <ends-with>
302+ <expression>(\))</expression>
303+ <capture number="1" name="haskell.tuple.bracket" />
304+ </ends-with>
305+ <subscopes>
306+ <include syntax="self" collection="expressions" />
307+ </subscopes>
308+ </scope>
309+ </collection>
310+
311+ <collection name="typeclass">
312+ <symbol type="interface" />
313+ <scope name="haskell.definition.class">
314+ <starts-with>
315+ <expression>^(\h*)(class)($|\h)</expression>
316+ <capture number="2" name="haskell.keyword.construct.class" />
317+ </starts-with>
318+ <ends-with>
319+ <template>^(?!\s+\1\S)(?!\s*$)</template>
320+ </ends-with>
321+ <subscopes>
322+ <scope name="haskell.keyword.construct.where">
323+ <expression>where</expression>
324+ </scope>
325+ <include syntax="self" collection="type" />
326+ <include syntax="self" collection="type-definition" />
327+ <!-- <include syntax="self" collection="type-annotation" /> -->
328+ <include syntax="self" collection="definition" />
329+ </subscopes>
330+ </scope>
331+ </collection>
332+
333+ <collection name="instance">
334+ <scope name="haskell.instance">
335+ <symbol type="category" />
336+ <starts-with>
337+ <expression>^(\h*)(instance)($|\h)</expression>
338+ <capture number="2" name="haskell.keyword.construct.instance" />
339+ </starts-with>
340+ <ends-with>
341+ <template>^(?!\s+\1\S)(?!\s*$)</template>
342+ </ends-with>
343+ <subscopes>
344+ <scope name="haskell.keyword.construct.where">
345+ <expression>where</expression>
346+ </scope>
347+ <include syntax="self" collection="type" />
348+ <include syntax="self" collection="type-definition" />
349+ <include syntax="self" collection="type-annotation" />
350+ <include syntax="self" collection="definition" />
351+ </subscopes>
352+ </scope>
353+ </collection>
354+
355+ <collection name="type-family-definition">
356+ <scope name="haskell.definition.type.type-family">
357+ <symbol type="type" />
358+ <starts-with>
359+ <expression>^(\h*)(type\h+family)\h+`?(\w(\w|')*)`?($|\h)</expression>
360+ <capture number="2" name="haskell.keyword.construct.type-family" />
361+ </starts-with>
362+ <ends-with>
363+ <template>^(?!\s+\1\S)(?!\s*$)</template>
364+ </ends-with>
365+ <subscopes>
366+ <scope name="haskell.keyword.construct.where">
367+ <expression>where</expression>
368+ </scope>
369+ <include syntax="self" collection="type" />
370+ </subscopes>
371+ </scope>
372+ </collection>
373+
374+ <collection name="definition">
375+ <scope name="haskell.definition.type.function">
376+ <symbol type="function">
377+ <display-name>
378+ <component selector="haskell.definition.type.function" />
379+ </display-name>
380+
381+ </symbol>
382+ <starts-with>
383+ <expression>^(?=(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h))</expression>
384+ <capture number="2" name="haskell.keyword.construct.default" />
385+ <capture number="3" name="haskell.identifier.function" />
386+ </starts-with>
387+ <ends-with>
388+ <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
389+ </ends-with>
390+ <subscopes>
391+ <include syntax="self" collection="type-annotation" />
392+ <include syntax="self" collection="implementation" />
393+ </subscopes>
394+ </scope>
395+ </collection>
396+
397+ <collection name="do-bind">
398+ <scope name="do-bind">
399+ <starts-with>
400+ <expression>^(?=(\h*).+<-($|\h))</expression>
401+ </starts-with>
402+ <ends-with>
403+ <template>^(?!\0)(?!\s+\1\S)(?!\s*$)</template>
404+ </ends-with>
405+ <subscopes anchored="true">
406+ <include syntax="self" collection="pattern-match" />
407+ <scope name="bind-arrow">
408+ <expression><-</expression>
409+ </scope>
410+ <include syntax="self" collection="expressions" repeat="true" />
411+ </subscopes>
412+ </scope>
413+ </collection>
414+
415+ <collection name="implementation">
416+ <scope name="haskell.definition.type.function">
417+ <local scope="within-construct" />
418+ <starts-with>
419+ <expression>^(\h*)(default\h+)?`?(\w(\w|')*)`?($|\h)</expression>
420+ <capture number="2" name="haskell.keyword.construct.default" />
421+ <capture number="3" name="haskell.identifier.function" />
422+ </starts-with>
423+ <ends-with>
424+ <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
425+ </ends-with>
426+ <subscopes>
427+ <include syntax="self" collection="where-clause" />
428+ <include syntax="self" collection="expressions" />
429+ </subscopes>
430+ </scope>
431+ </collection>
432+
433+ <collection name="type-annotation">
434+ <scope name="haskell.definition.type.function">
435+ <starts-with>
436+ <expression>^(\h*)`?(\w(\w|')*)`?\h*::($|\h)</expression>
437+ <capture number="2" name="haskell.identifier.function" />
438+ </starts-with>
439+ <ends-with>
440+ <template>^(?!\s+\1\S)(?!\s*$)</template>
441+ </ends-with>
442+ <subscopes>
443+ <include syntax="self" collection="type" />
444+ </subscopes>
445+ </scope>
446+ </collection>
447+
448+ <collection name="type-definition">
449+ <scope name="haskell.definition.type">
450+ <starts-with>
451+ <expression>^(\h*)(type)\h+(\w(\w|')*)</expression>
452+ <capture number="2" name="haskell.keyword.construct.type" />
453+ <capture number="3" name="haskell.identifier.type" />
454+ </starts-with>
455+ <ends-with>
456+ <template>^(?!\s+\1\S)(?!\s*$)</template>
457+ </ends-with>
458+ <subscopes>
459+ <include syntax="self" collection="type" />
460+ </subscopes>
461+ </scope>
462+ </collection>
463+
464+ <collection name="GADT-definition">
465+ <scope name="haskell.definition.struct.GADT">
466+ <starts-with>
467+ <expression>^(\h*)(data)\h+(\w(\w|')*)</expression>
468+ <capture number="2" name="haskell.keyword.construct.data.GADT" />
469+ </starts-with>
470+ <ends-with>
471+ <template>^(?!\s+\1\S)(?!\s*$)</template>
472+ </ends-with>
473+ <subscopes>
474+ <include syntax="self" collection="gadt-constructor" />
475+ <include syntax="self" collection="type" />
476+ <include syntax="self" collection="record-definition" />
477+ <include syntax="self" collection="record-definition-field-name" />
478+ </subscopes>
479+ </scope>
480+ </collection>
481+
482+ <collection name="gadt-constructor">
483+ <scope name="identifier.type.struct.GADT.constructor">
484+ <expression>^\h+[A-Z](\w|')*</expression>
485+ </scope>
486+ </collection>
487+
488+ <collection name="data-definition">
489+ <scope name="haskell.definition.struct.data">
490+ <starts-with>
491+ <expression>^(\h*)(data|newtype)\h+(\w(\w|')*)</expression>
492+ <capture number="2" name="haskell.keyword.construct.data.newtype" />
493+ <capture number="3" name="haskell.identifier.type" />
494+ </starts-with>
495+ <ends-with>
496+ <template>^(?!\s+\1\S)(?!\s*$)</template>
497+ </ends-with>
498+ <subscopes>
499+ <include syntax="self" collection="record-definition" />
500+ <include syntax="self" collection="data-constructor" />
501+ <include syntax="self" collection="type" />
502+ </subscopes>
503+ </scope>
504+ </collection>
505+
506+ <collection name="data-constructor">
507+ <scope name="haskell.identifier.type.struct.data.constructor">
508+ <expression>=\h+[A-Z](\w|')*</expression>
509+ </scope>
510+ <scope name="haskell.identifier.type.struct.data.constructor">
511+ <expression>\|\h+[A-Z](\w|')*</expression>
512+ </scope>
513+ </collection>
514+
515+ <collection name="record-definition">
516+ <scope name="haskell.record">
517+ <starts-with>
518+ <expression>(\{)</expression>
519+ <capture number="1" name="haskell.record.bracket" />
520+ </starts-with>
521+ <ends-with>
522+ <expression>(\})</expression>
523+ <capture number="1" name="haskell.record.bracket" />
524+ </ends-with>
525+ <subscopes>
526+ <include syntax="self" collection="record-definition-field-name" />
527+ <include syntax="self" collection="type" />
528+ </subscopes>
529+ </scope>
530+ </collection>
531+
532+ <collection name="record-definition-field-name">
533+ <scope name="haskell.record.definition.property">
534+ <expression>\w(\w|')*\h*::</expression>
535+ </scope>
536+ </collection>
537+
538+ <collection name="type">
539+ <include syntax="self" collection="type-list" />
540+ <scope name="haskell.identifier.type">
541+ <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
542+ </scope>
543+ <scope name="haskell.keyword.construct.forall">
544+ <expression>forall</expression>
545+ </scope>
546+ <scope name="haskell.identifier.type.variable">
547+ <expression>\w(\w|')*</expression>
548+ </scope>
549+ <scope name="haskell.keyword.construct.function-arrow">
550+ <expression>-></expression>
551+ </scope>
552+ <scope name="haskell.keyword.construct.fat-arrow">
553+ <expression>=></expression>
554+ </scope>
555+ </collection>
556+
557+ <collection name="pattern-definition">
558+ <scope name="haskell.pattern">
559+ <starts-with>
560+ <expression>^(\h*)(pattern)\h+(\w(\w|')*)</expression>
561+ <capture number="2" name="haskell.keyword.construct.pattern" />
562+ <capture number="3" name="haskell.identifier.decorator.pattern" />
563+ </starts-with>
564+ <ends-with>
565+ <template>^(?!\s+\1\S)(?!\s*$)</template>
566+ </ends-with>
567+ <subscopes>
568+ <scope name="haskell.keyword.construct.where">
569+ <expression>where</expression>
570+ </scope>
571+ <include syntax="self" collection="expressions" />
572+ </subscopes>
573+ </scope>
574+ </collection>
575+
576+ <collection name="type-list">
577+ <scope name="haskell.type-list">
578+ <starts-with>
579+ <expression>('\[)</expression>
580+ <capture number="1" name="haskell.type-list.bracket" />
581+ </starts-with>
582+ <ends-with>
583+ <expression>(\])</expression>
584+ <capture number="1" name="haskell.type-list.bracket" />
585+ </ends-with>
586+ <subscopes>
587+ <include syntax="self" collection="type" />
588+ </subscopes>
589+ </scope>
590+ </collection>
591+
592+ <collection name="lambda-head">
593+ <scope name="haskell.lambda">
594+ <starts-with>
595+ <expression>(\\)</expression>
596+ <capture number="1" name="haskell.keyword.construct.lambda" />
597+ </starts-with>
598+ <ends-with>
599+ <expression>(->)</expression>
600+ <capture number="1" name="haskell.keyword.construct.lambda" />
601+ </ends-with>
602+ <subscopes>
603+ <include syntax="self" collection="pattern-match" />
604+ </subscopes>
605+ </scope>
606+ </collection>
607+
608+ <collection name="lambda-case">
609+ <scope name="haskell.keyword.condition.lambda-case">
610+ <expression>\\case</expression>
611+ </scope>
612+ </collection>
613+
614+ <collection name="where-clause">
615+ <scope name="haskell.construct.where">
616+ <local scope="within-parent" />
617+ <starts-with>
618+ <expression>^(\h*)(where)</expression>
619+ <capture number="2" name="haskell.construct.keyword.where" />
620+ </starts-with>
621+ <ends-with>
622+ <template>^(?!\1\s*\S)(?!s*$)</template>
623+ </ends-with>
624+ <subscopes>
625+ <include syntax="self" collection="definition" />
626+ </subscopes>
627+ </scope>
628+ </collection>
629+
630+
631+ <collection name="qvarid">
632+ <scope name="haskell.identifier.function">
633+ <expression>([A-Z](\w|')*\.)*\w(\w|')*</expression>
634+ </scope>
635+ </collection>
636+
637+ <collection name="varid">
638+ <scope name="haskell.identifier.variable">
639+ <expression>\w(\w|')*</expression>
640+ </scope>
641+ </collection>
642+
643+ <collection name="qconid">
644+ <scope name="haskell.identifier.type.struct.constructor">
645+ <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
646+ </scope>
647+ </collection>
648+
649+ <collection name="qconsym">
650+ <scope name="haskell.identifier.decorator.pattern">
651+ <expression>([A-Z](\w|')*\.):(\w|')*</expression>
652+ </scope>
653+ </collection>
654+
655+ <collection name="literal">
656+ <include syntax="self" collection="number" />
657+ <include syntax="self" collection="strings" />
658+ </collection>
659+
660+
661+ <collection name="strings">
662+ <scope name="haskell.string.double-quoted">
663+ <starts-with>
664+ <expression>"</expression>
665+ </starts-with>
666+ <ends-with>
667+ <expression>"</expression>
668+ </ends-with>
669+ <subscopes>
670+ <scope name="haskell.string.escape-sequences">
671+ <expression>\\.</expression>
672+ </scope>
673+ </subscopes>
674+ </scope>
675+ <scope name="haskell.string.single-quoted">
676+ <expression>'([^'\\]|\\.)'</expression>
677+ </scope>
678+ </collection>
679+
680+
681+ <collection name="number">
682+ <scope name="haskell.value.number">
683+ <expression>(0x|0o|0O|0X)?\d+(\d|_)*(\.[\d|_]+)?((e|E)(\+|-)?\d+)?</expression>
684+ </scope>
685+ </collection>
686+
687+
688+ <collection name="module">
689+ <scope name="haskell.definition.module.package">
690+ <starts-with>
691+ <expression>^(module)\s+(\w|\.)+</expression>
692+ <capture number="1" name="haskell.construct.keyword.module" />
693+ <capture number="2" name="haskell.definition.module.package" />
694+ </starts-with>
695+ <ends-with>
696+ <expression>(where)</expression>
697+ <capture number="1" name="haskell.construct.keyword.module" />
698+ </ends-with>
699+ <subscopes export-symbols="true">
700+ <scope name="identifier.constant">
701+ <expression>(\w|')+</expression>
702+ </scope>
703+ </subscopes>
704+ </scope>
705+ </collection>
706+
707+ <collection name="import">
708+ <scope name="haskell.construct.keyword.import">
709+ <expression>^import\s</expression>
710+ </scope>
711+ <scope name="haskell.construct.keyword.qualified">
712+ <expression>qualified</expression>
713+ </scope>
714+ <scope name="haskell.construct.keyword.as">
715+ <expression>as</expression>
716+ </scope>
717+ <scope name="haskell.identifier.module.package">
718+ <expression>([A-Z](\w|')*\.)*[A-Z](\w|')*</expression>
719+ </scope>
720+ <include syntax="self" collection="import-list" />
721+ </collection>
722+
723+ <collection name="import-list">
724+ <scope name="import-list">
725+ <starts-with>
726+ <expression>(\()</expression>
727+ <capture number="1" name="haskell.import-list.bracket" />
728+ </starts-with>
729+ <ends-with>
730+ <expression>(\))</expression>
731+ <capture number="1" name="haskell.import-list.bracket" />
732+ </ends-with>
733+ <subscopes>
734+ <scope name="identifier.decorator">
735+ <expression>([A-Z](\w|')*\.)*\w(\w|')*</expression>
736+ </scope>
737+ </subscopes>
738+ </scope>
739+ </collection>
740+
741+ <!-- <collection name="special">
742+ <scope>
743+ <expression>(;|,)</expression>
744+ </scope>
745+ </collection> -->
746+
747+
748+ <collection name="reservedop">
749+ <scope name="keyword.operator">
750+ <expression>(\.\.|:|::|=|\\|\||<-|->|@|~|=>)</expression>
751+ </scope>
752+ </collection>
753+
754+ <collection name="keywords">
755+ <scope name="haskell.keyword.modifier">
756+ <symbol type="keyword" />
757+ <strings>
758+ <string>do</string>
759+ <string>in</string>
760+ <string>infix</string>
761+ <string>infixl</string>
762+ <string>infixr</string>
763+ <string>where</string>
764+ <string>let</string>
765+ </strings>
766+ </scope>
767+ <scope name="haskell.keyword.condition">
768+ <symbol type="keyword" />
769+ <strings>
770+ <string>of</string>
771+ <string>case</string>
772+ <string>else</string>
773+ <string>if</string>
774+ <string>then</string>
775+ </strings>
776+ </scope>
777+ <scope name="haskell.keyword.keyword.construct">
778+ <symbol type="keyword" />
779+ <strings>
780+ <string>instance</string>
781+ <string>newtype</string>
782+ <string>module</string>
783+ <string>type</string>
784+ <string>class</string>
785+ <string>data</string>
786+ <string>default</string>
787+ <string>deriving</string>
788+ <string>foreign</string>
789+ </strings>
790+ </scope>
791+ <scope name="haskell.keyword.self">
792+ <symbol type="keyword" />
793+ <strings>
794+ <string>undefined</string>
795+ <string>_</string>
796+ </strings>
797+ </scope>
798+ </collection>
799+
800+ <collection name="comments">
801+ <scope name="haskell.comment.single" spell-check="true">
802+ <starts-with>
803+ <expression>--</expression>
804+ </starts-with>
805+ <ends-with>
806+ <expression>$</expression>
807+ </ends-with>
808+ </scope>
809+ <scope name="haskell.comment.block" spell-check="true">
810+ <starts-with>
811+ <expression>{-</expression>
812+ </starts-with>
813+ <ends-with>
814+ <expression>-}</expression>
815+ </ends-with>
816+ </scope>
817+ </collection>
818+
819+
820+ </collections>
821+</syntax>