@willbooster/tree-sitter-haskell 9.0.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-haskell",
3
- "version": "9.0.0",
3
+ "version": "11.0.0",
4
4
  "description": "Haskell grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -46,16 +46,16 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@tsconfig/bun": "1.0.11",
49
- "@types/bun": "1.4.2",
49
+ "@types/bun": "1.4.3",
50
50
  "@vitest/browser-playwright": "5.0.3",
51
51
  "@willbooster/oxfmt-config": "1.2.2",
52
52
  "@willbooster/oxlint-config": "1.4.8",
53
- "@willbooster/wb": "22.26.1",
54
- "@willbooster/web-tree-sitter": "7.0.7",
53
+ "@willbooster/wb": "22.26.2",
54
+ "@willbooster/web-tree-sitter": "10.0.1",
55
55
  "conventional-changelog-conventionalcommits": "10.4.0",
56
- "lefthook": "2.2.1",
57
- "oxfmt": "0.72.0",
58
- "oxlint": "1.87.0",
56
+ "lefthook": "2.2.2",
57
+ "oxfmt": "0.73.0",
58
+ "oxlint": "1.88.0",
59
59
  "oxlint-tsgolint": "7.0.2004",
60
60
  "playwright": "1.63.0",
61
61
  "semantic-release": "25.0.9",
@@ -64,7 +64,7 @@
64
64
  "wrangler": "4.147.0"
65
65
  },
66
66
  "peerDependencies": {
67
- "@willbooster/web-tree-sitter": "^7.0.7"
67
+ "@willbooster/web-tree-sitter": "^10.0.1"
68
68
  },
69
69
  "peerDependenciesMeta": {
70
70
  "@willbooster/web-tree-sitter": {
@@ -2,25 +2,25 @@
2
2
  ; and don't override destructured parameters
3
3
  (variable) @variable
4
4
 
5
- [(pattern/wildcard) (binding_pattern/wildcard)] @variable
5
+ [(pattern_operand/wildcard) (binding_pattern_operand/wildcard)] @variable
6
6
 
7
7
  (function
8
8
  patterns: (patterns
9
9
  (_) @variable.parameter))
10
10
 
11
- (expression/lambda
11
+ (expression_operand/lambda
12
12
  (_)+ @variable.parameter
13
13
  "->")
14
14
 
15
15
  (function
16
16
  (infix
17
- (pattern) @variable.parameter))
17
+ [(pattern_operand) (infix_chain)] @variable.parameter))
18
18
 
19
19
  (integer) @number
20
20
 
21
21
  (negation) @number
22
22
 
23
- (expression/literal
23
+ (expression_operand/literal
24
24
  (float)) @number.float
25
25
 
26
26
  (char) @character
@@ -70,6 +70,7 @@
70
70
 
71
71
  [
72
72
  (operator)
73
+ (prefix_negation)
73
74
  (constructor_operator)
74
75
  (all_names)
75
76
  (wildcard)
@@ -127,11 +128,11 @@
127
128
 
128
129
  (signature
129
130
  name: (variable) @variable
130
- type: (type))
131
+ type: [(type_operand) (infix_chain)])
131
132
 
132
133
  ((signature
133
134
  name: (variable) @_name
134
- type: (type))
135
+ type: [(type_operand) (infix_chain)])
135
136
  .
136
137
  [
137
138
  (function name: (variable) @variable)
@@ -142,13 +143,13 @@
142
143
 
143
144
  (signature
144
145
  name: (variable) @function
145
- type: (type/apply
146
+ type: (type_operand/apply
146
147
  constructor: (name) @_type)
147
148
  (#eq? @_type "IO"))
148
149
 
149
150
  ((signature
150
151
  name: (variable) @_name
151
- type: (type/apply
152
+ type: (type_operand/apply
152
153
  constructor: (name) @_type)
153
154
  (#eq? @_type "IO"))
154
155
  .
@@ -170,12 +171,12 @@
170
171
  (bind
171
172
  name: (variable) @function
172
173
  (match
173
- expression: (expression/lambda)))
174
+ expression: (expression_operand/lambda)))
174
175
 
175
176
  (view_pattern
176
177
  [
177
- (expression/variable) @function.call
178
- (expression/qualified
178
+ (expression_operand/variable) @function.call
179
+ (expression_operand/qualified
179
180
  (variable) @function.call)
180
181
  ])
181
182
 
@@ -186,7 +187,7 @@
186
187
  (variable) @operator)
187
188
  ])
188
189
 
189
- (infix
190
+ (operator_chain
190
191
  [
191
192
  (variable) @function.call
192
193
  (qualified
@@ -196,72 +197,42 @@
196
197
  .
197
198
  (operator))
198
199
 
199
- ((expression/variable) @variable
200
+ ((expression_operand/variable) @variable
200
201
  .
201
202
  (operator))
202
203
 
203
204
  ((operator)
204
205
  .
205
206
  [
206
- (expression/variable) @variable
207
- (expression/qualified
207
+ (expression_operand/variable) @variable
208
+ (expression_operand/qualified
208
209
  (variable) @variable)
209
210
  ])
210
211
 
211
212
  ([
212
- (expression/variable) @function.call
213
- (expression/qualified
213
+ (expression_operand/variable) @function.call
214
+ (expression_operand/qualified
214
215
  (variable) @function.call)
215
216
  ]
216
217
  .
217
218
  (operator) @_op
218
219
  (#any-of? @_op "$" "<$>" ">>=" "=<<"))
219
220
 
220
- ((infix
221
- [
222
- (operator)
223
- (infix_id (variable))
224
- ]
225
- .
226
- [
227
- (variable) @function.call
228
- (qualified
229
- (variable) @function.call)
230
- ])
231
- .
232
- (operator) @_op
233
- (#any-of? @_op "$" "<$>" "=<<"))
234
-
235
221
  (
236
222
  [
237
- (expression/variable) @function
238
- (expression/qualified
223
+ (expression_operand/variable) @function
224
+ (expression_operand/qualified
239
225
  (variable) @function)
240
226
  ]
241
227
  .
242
228
  (operator) @_op
243
229
  (#any-of? @_op "." ">>>" "***" ">=>" "<=<"))
244
230
 
245
- ((infix
246
- [
247
- (operator)
248
- (infix_id (variable))
249
- ]
250
- .
251
- [
252
- (variable) @function
253
- (qualified
254
- (variable) @function)
255
- ])
256
- .
257
- (operator) @_op
258
- (#any-of? @_op "." ">>>" "***" ">=>" "<=<"))
259
-
260
231
  ((operator) @_op
261
232
  .
262
233
  [
263
- (expression/variable) @function
264
- (expression/qualified
234
+ (expression_operand/variable) @function
235
+ (expression_operand/qualified
265
236
  (variable) @function)
266
237
  ]
267
238
  (#any-of? @_op "." ">>>" "***" ">=>" "<=<"))
@@ -269,21 +240,21 @@
269
240
  (function
270
241
  name: (variable) @function
271
242
  (match
272
- expression: (infix
243
+ expression: (operator_chain
273
244
  operator: (operator) @_op
274
245
  (#any-of? @_op "." ">>>" "***" ">=>" "<=<"))))
275
246
 
276
247
  (apply
277
248
  [
278
- (expression/variable) @function.call
279
- (expression/qualified
249
+ (expression_operand/variable) @function.call
250
+ (expression_operand/qualified
280
251
  (variable) @function.call)
281
252
  ])
282
253
 
283
254
  (apply
284
255
  .
285
- (expression/parens
286
- (infix
256
+ (expression_operand/parens
257
+ (operator_chain
287
258
  [
288
259
  (variable) @function.call
289
260
  (qualified
@@ -294,8 +265,8 @@
294
265
 
295
266
  (apply
296
267
  .
297
- (expression/parens
298
- (infix
268
+ (expression_operand/parens
269
+ (operator_chain
299
270
  (operator)
300
271
  .
301
272
  [
@@ -308,8 +279,8 @@
308
279
  (_)
309
280
  .
310
281
  [
311
- (expression/variable) @variable
312
- (expression/qualified
282
+ (expression_operand/variable) @variable
283
+ (expression_operand/qualified
313
284
  (variable) @variable)
314
285
  ])
315
286
 
@@ -318,7 +289,7 @@
318
289
  (#eq? @function "main"))
319
290
 
320
291
  (signature
321
- pattern: [(pattern/variable) (binding_pattern/variable)] @function
292
+ pattern: [(pattern_operand/variable) (binding_pattern_operand/variable)] @function
322
293
  type: (quantified_type))
323
294
 
324
295
  (signature
@@ -335,11 +306,11 @@
335
306
 
336
307
  (name) @type
337
308
 
338
- (type/star) @type
309
+ (type_operand/star) @type
339
310
 
340
311
  [
341
- (type/variable)
342
- (constraint/variable)
312
+ (type_operand/variable)
313
+ (constraint_operand/variable)
343
314
  (type_param/variable)
344
315
  ] @type
345
316
 
@@ -388,7 +359,7 @@
388
359
 
389
360
  (comment) @spell
390
361
 
391
- (expression/apply
362
+ (expression_operand/apply
392
363
  function: (parenthesized_name
393
364
  [
394
365
  (variable) @function.call
@@ -1,6 +1,6 @@
1
1
  (signature name: (variable)) @local.definition
2
2
  (function name: (variable)) @local.definition
3
- [(pattern/variable) (binding_pattern/variable)] @local.definition
4
- (expression/variable) @local.reference
5
- (expression/parenthesized_name (variable) @local.reference)
3
+ [(pattern_operand/variable) (binding_pattern_operand/variable)] @local.definition
4
+ (expression_operand/variable) @local.reference
5
+ (expression_operand/parenthesized_name (variable) @local.reference)
6
6
  (_ name: (parenthesized_name (variable) @local.definition))
package/queries/tags.scm CHANGED
@@ -15,9 +15,9 @@
15
15
  (parenthesized_name [(variable) @name (prefix_id (operator) @name)])
16
16
  ]) @definition.variable)
17
17
 
18
- (binding_pattern/variable) @name @definition.variable
19
- (binding_pattern/prefix_id (operator) @name) @definition.variable
20
- (binding_pattern/as bind: (variable) @name) @definition.variable
18
+ (binding_pattern_operand/variable) @name @definition.variable
19
+ (binding_pattern_operand/prefix_id (operator) @name) @definition.variable
20
+ (binding_pattern_operand/as bind: (variable) @name) @definition.variable
21
21
 
22
22
  (binding_field_pattern/field_pattern
23
23
  !pattern
@@ -110,13 +110,21 @@
110
110
  (prefix_id [(operator) @name (constructor_operator) @name])
111
111
  (prefix_id (qualified id: [(operator) @name (constructor_operator) @name]))
112
112
  ]) @reference.implementation
113
- (instance head: (infix operator: [
114
- (constructor_operator) @name
115
- (operator) @name
116
- (infix_id (name) @name)
117
- (qualified id: [(constructor_operator) @name (operator) @name])
118
- (infix_id (qualified id: (name) @name))
119
- ])) @reference.implementation
113
+ (instance head: (infix_chain
114
+ . [(cpp) (comment) (haddock) (pragma)]*
115
+ . operand: (_)
116
+ . [(cpp) (comment) (haddock) (pragma)]*
117
+ . operator: [
118
+ (constructor_operator) @name
119
+ (operator) @name
120
+ (infix_id (name) @name)
121
+ (qualified id: [(constructor_operator) @name (operator) @name])
122
+ (infix_id (qualified id: (name) @name))
123
+ ]
124
+ . [(cpp) (comment) (haddock) (pragma)]*
125
+ . operand: (_)
126
+ . [(cpp) (comment) (haddock) (pragma)]*
127
+ .)) @reference.implementation
120
128
 
121
129
  (deriving_instance name: [
122
130
  (name) @name
@@ -124,18 +132,26 @@
124
132
  (prefix_id [(operator) @name (constructor_operator) @name])
125
133
  (prefix_id (qualified id: [(operator) @name (constructor_operator) @name]))
126
134
  ]) @reference.implementation
127
- (deriving_instance head: (infix operator: [
128
- (constructor_operator) @name
129
- (operator) @name
130
- (infix_id (name) @name)
131
- (qualified id: [(constructor_operator) @name (operator) @name])
132
- (infix_id (qualified id: (name) @name))
133
- ])) @reference.implementation
135
+ (deriving_instance head: (infix_chain
136
+ . [(cpp) (comment) (haddock) (pragma)]*
137
+ . operand: (_)
138
+ . [(cpp) (comment) (haddock) (pragma)]*
139
+ . operator: [
140
+ (constructor_operator) @name
141
+ (operator) @name
142
+ (infix_id (name) @name)
143
+ (qualified id: [(constructor_operator) @name (operator) @name])
144
+ (infix_id (qualified id: (name) @name))
145
+ ]
146
+ . [(cpp) (comment) (haddock) (pragma)]*
147
+ . operand: (_)
148
+ . [(cpp) (comment) (haddock) (pragma)]*
149
+ .)) @reference.implementation
134
150
 
135
151
  (foreign_import
136
152
  signature: (signature name: [(variable) @name (prefix_id (operator) @name)])) @definition.function
137
153
 
138
- (expression/apply
154
+ (expression_operand/apply
139
155
  function: [
140
156
  (variable) @name
141
157
  (qualified id: (variable) @name)
@@ -149,7 +165,7 @@
149
165
  ])
150
166
  ]) @reference.call
151
167
 
152
- (expression/infix
168
+ (operator_chain
153
169
  operator: [
154
170
  (operator) @name
155
171
  (infix_id (variable) @name)