@@ -79,34 +79,19 @@
79 </collection>
79 </collection>
81 <collection name="expressions">
81 <collection name="expressions">
83− <expression></expression>
85 <include syntax="self" collection="do-bind" />
82 <include syntax="self" collection="do-bind" />
86 <include syntax="self" collection="literal" />
83 <include syntax="self" collection="literal" />
87 <include syntax="self" collection="operators" />
84 <include syntax="self" collection="operators" />
85+ <include syntax="self" collection="record-match" />
88 <include syntax="self" collection="list" />
86 <include syntax="self" collection="list" />
87+ <include syntax="self" collection="view-pattern" />
89 <include syntax="self" collection="lambda-case" />
88 <include syntax="self" collection="lambda-case" />
90 <include syntax="self" collection="lambda-head" />
89 <include syntax="self" collection="lambda-head" />
91 <include syntax="self" collection="type-applications" />
90 <include syntax="self" collection="type-applications" />
92 <include syntax="self" collection="outer-case-expression" />
91 <include syntax="self" collection="outer-case-expression" />
92+ <include syntax="self" collection="qconid" />
93 <include syntax="self" collection="qvarid" />
93 <include syntax="self" collection="qvarid" />
94 <include syntax="self" collection="tuple" />
94 <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="tuple-match" />
104− <!-- <include syntax="self" collection="at-pattern" /> -->
105− <include syntax="self" collection="varid" />
106− <include syntax="self" collection="qconid" />
107− <include syntax="self" collection="record-match" />
108− <include syntax="self" collection="list-pattern" />
109− <include syntax="self" collection="view-pattern" />
110 </collection>
95 </collection>
112 <collection name="type-applications">
97 <collection name="type-applications">
@@ -165,8 +150,7 @@
165 <capture number="1" name="haskell.pattern.record.bracket" />
150 <capture number="1" name="haskell.pattern.record.bracket" />
166 </ends-with>
151 </ends-with>
167 <subscopes>
152 <subscopes>
168− <include syntax="self" collection="pattern-match" />
153+ <include syntax="self" collection="expressions" />
169− <include syntax="self" collection="varid" />
170 <scope name="record-sep">
154 <scope name="record-sep">
171 <expression>=</expression>
155 <expression>=</expression>
@@ -219,24 +203,6 @@
220 </collection>
204 </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" />
240 <collection name="view-pattern">
206 <collection name="view-pattern">
241 <scope name="haskell.pattern.view">
207 <scope name="haskell.pattern.view">
242 <symbol type="expression" />
208 <symbol type="expression" />
@@ -253,24 +219,7 @@
253 <scope name="haskell.pattern.view.operator.arrow">
219 <scope name="haskell.pattern.view.operator.arrow">
254 <expression>-></expression>
220 <expression>-></expression>
256− <include syntax="self" collection="pattern-match" />
222+ <include syntax="self" collection="expressions" />
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" />
274 </subscopes>
223 </subscopes>
276 </collection>
225 </collection>
@@ -286,7 +235,7 @@
286 <capture number="1" name="haskell.case.keyword.condition" />
235 <capture number="1" name="haskell.case.keyword.condition" />
287 </ends-with>
236 </ends-with>
288 <subscopes anchored="true">
237 <subscopes anchored="true">
289− <include syntax="self" collection="pattern-match" />
238+ <include syntax="self" collection="expressions" />
290 </subscopes>
239 </subscopes>
292 </collection>
241 </collection>
@@ -300,7 +249,7 @@
300 <expression>-></expression>
249 <expression>-></expression>
301 </ends-with>
250 </ends-with>
302 <subscopes anchored="true">
251 <subscopes anchored="true">
303− <include syntax="self" collection="pattern-match" />
252+ <include syntax="self" collection="expressions" />
304 </subscopes>
253 </subscopes>
306 </collection>
255 </collection>
@@ -500,24 +449,6 @@
501 </collection>
450 </collection>
503− <collection name="do-pattern">
504− <scope name="do-pattern">
506− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
509− <expression><-</expression>
512− <include syntax="self" collection="pattern-match" />
513− <!-- <scope name="bind-arrow">
514− <expression><-</expression>
516− <include syntax="self" collection="expressions" repeat="true" /> -->
521 <collection name="implementation">
452 <collection name="implementation">
522 <scope name="haskell.definition.type.function">
453 <scope name="haskell.definition.type.function">
523 <starts-with>
454 <starts-with>
@@ -528,7 +459,7 @@
528 <ends-with>
459 <ends-with>
529 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
460 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
530 </ends-with>
461 </ends-with>
531− <subscopes anchored="true">
462+ <subscopes>
532 <include syntax="self" collection="pattern-match" optional="true" repeat="true" />
463 <include syntax="self" collection="pattern-match" optional="true" repeat="true" />
534 <expression>=</expression>
465 <expression>=</expression>
@@ -619,6 +550,9 @@
619 <scope name="haskell.record.construct.deriving.keyword">
550 <scope name="haskell.record.construct.deriving.keyword">
620 <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
551 <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
553+ <scope name="haskell.record.construct.deriving.keyword">
554+ <expression>via</expression>
622 </collection>
556 </collection>
624 <collection name="record-definition">
558 <collection name="record-definition">
@@ -699,7 +633,7 @@
699 <expression>forall</expression>
633 <expression>forall</expression>
701 <scope name="haskell.identifier.type.variable">
635 <scope name="haskell.identifier.type.variable">
702− <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\S)*</expression>
636+ <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\w)*</expression>
704 </collection>
638 </collection>