@@ -79,34 +79,19 @@
7979 </collection>
8080
8181 <collection name="expressions">
82− <scope>
83− <expression></expression>
84− </scope>
8582 <include syntax="self" collection="do-bind" />
8683 <include syntax="self" collection="literal" />
8784 <include syntax="self" collection="operators" />
85+ <include syntax="self" collection="record-match" />
8886 <include syntax="self" collection="list" />
87+ <include syntax="self" collection="view-pattern" />
8988 <include syntax="self" collection="lambda-case" />
9089 <include syntax="self" collection="lambda-head" />
9190 <include syntax="self" collection="type-applications" />
9291 <include syntax="self" collection="outer-case-expression" />
92+ <include syntax="self" collection="qconid" />
9393 <include syntax="self" collection="qvarid" />
9494 <include syntax="self" collection="tuple" />
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="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" />
11095 </collection>
11196
11297 <collection name="type-applications">
@@ -165,8 +150,7 @@
165150 <capture number="1" name="haskell.pattern.record.bracket" />
166151 </ends-with>
167152 <subscopes>
168− <include syntax="self" collection="pattern-match" />
169− <include syntax="self" collection="varid" />
153+ <include syntax="self" collection="expressions" />
170154 <scope name="record-sep">
171155 <expression>=</expression>
172156 </scope>
@@ -219,24 +203,6 @@
219203 </scope>
220204 </collection>
221205
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−
240206 <collection name="view-pattern">
241207 <scope name="haskell.pattern.view">
242208 <symbol type="expression" />
@@ -253,24 +219,7 @@
253219 <scope name="haskell.pattern.view.operator.arrow">
254220 <expression>-></expression>
255221 </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" />
222+ <include syntax="self" collection="expressions" />
274223 </subscopes>
275224 </scope>
276225 </collection>
@@ -286,7 +235,7 @@
286235 <capture number="1" name="haskell.case.keyword.condition" />
287236 </ends-with>
288237 <subscopes anchored="true">
289− <include syntax="self" collection="pattern-match" />
238+ <include syntax="self" collection="expressions" />
290239 </subscopes>
291240 </scope>
292241 </collection>
@@ -300,7 +249,7 @@
300249 <expression>-></expression>
301250 </ends-with>
302251 <subscopes anchored="true">
303− <include syntax="self" collection="pattern-match" />
252+ <include syntax="self" collection="expressions" />
304253 </subscopes>
305254 </scope>
306255 </collection>
@@ -500,24 +449,6 @@
500449 </scope>
501450 </collection>
502451
503− <collection name="do-pattern">
504− <scope name="do-pattern">
505− <starts-with>
506− <expression>^(?=((\h*)\S.+<-($|\h)))</expression>
507− </starts-with>
508− <ends-with>
509− <expression><-</expression>
510− </ends-with>
511− <subscopes>
512− <include syntax="self" collection="pattern-match" />
513− <!-- <scope name="bind-arrow">
514− <expression><-</expression>
515− </scope>
516− <include syntax="self" collection="expressions" repeat="true" /> -->
517− </subscopes>
518− </scope>
519− </collection>
520−
521452 <collection name="implementation">
522453 <scope name="haskell.definition.type.function">
523454 <starts-with>
@@ -528,7 +459,7 @@
528459 <ends-with>
529460 <template>^(?!\1\3\s)(?!\s+\1\S)(?!\s*$)</template>
530461 </ends-with>
531− <subscopes anchored="true">
462+ <subscopes>
532463 <include syntax="self" collection="pattern-match" optional="true" repeat="true" />
533464 <scope>
534465 <expression>=</expression>
@@ -619,6 +550,9 @@
619550 <scope name="haskell.record.construct.deriving.keyword">
620551 <expression>deriving(\h+(newtype|stock|anyclass))?</expression>
621552 </scope>
553+ <scope name="haskell.record.construct.deriving.keyword">
554+ <expression>via</expression>
555+ </scope>
622556 </collection>
623557
624558 <collection name="record-definition">
@@ -699,7 +633,7 @@
699633 <expression>forall</expression>
700634 </scope>
701635 <scope name="haskell.identifier.type.variable">
702− <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\S)*</expression>
636+ <expression>(?!where)(?!=)((?!(\(|\)|\,|\!))\S)((?!(\(|\)|\,))\w)*</expression>
703637 </scope>
704638 </collection>
705639