[OCaml] Mobile-friendly clone of cgit.
1
{
2
"displayName":"Haskell",
3
"fileTypes":[
4
"hs",
5
"hs-boot",
6
"hsig"
7
],
8
"name":"haskell",
9
"patterns":[
10
{
11
"include":"#liquid_haskell"
12
},
13
{
14
"include":"#comment_like"
15
},
16
{
17
"include":"#numeric_literals"
18
},
19
{
20
"include":"#string_literal"
21
},
22
{
23
"include":"#char_literal"
24
},
25
{
26
"match":"(?<![#@])-}",
27
"name":"invalid"
28
},
29
{
30
"captures":{
31
"1":{
32
"name":"punctuation.paren.haskell"
33
},
34
"2":{
35
"name":"punctuation.paren.haskell"
36
}
37
},
38
"match":"(\\()\\s*(\\))",
39
"name":"constant.language.unit.haskell"
40
},
41
{
42
"captures":{
43
"1":{
44
"name":"punctuation.paren.haskell"
45
},
46
"2":{
47
"name":"keyword.operator.hash.haskell"
48
},
49
"3":{
50
"name":"keyword.operator.hash.haskell"
51
},
52
"4":{
53
"name":"punctuation.paren.haskell"
54
}
55
},
56
"match":"(\\()(#)\\s*(#)(\\))",
57
"name":"constant.language.unit.unboxed.haskell"
58
},
59
{
60
"captures":{
61
"1":{
62
"name":"punctuation.paren.haskell"
63
},
64
"2":{
65
"name":"punctuation.paren.haskell"
66
}
67
},
68
"match":"(\\()\\s*,[,\\s]*(\\))",
69
"name":"support.constant.tuple.haskell"
70
},
71
{
72
"captures":{
73
"1":{
74
"name":"punctuation.paren.haskell"
75
},
76
"2":{
77
"name":"keyword.operator.hash.haskell"
78
},
79
"3":{
80
"name":"keyword.operator.hash.haskell"
81
},
82
"4":{
83
"name":"punctuation.paren.haskell"
84
}
85
},
86
"match":"(\\()(#)\\s*,[,\\s]*(#)(\\))",
87
"name":"support.constant.tuple.unboxed.haskell"
88
},
89
{
90
"captures":{
91
"1":{
92
"name":"punctuation.bracket.haskell"
93
},
94
"2":{
95
"name":"punctuation.bracket.haskell"
96
}
97
},
98
"match":"(\\[)\\s*(])",
99
"name":"constant.language.empty-list.haskell"
100
},
101
{
102
"begin":"(\\b(?<!')(module)|^(signature))\\b((?!'))",
103
"beginCaptures":{
104
"2":{
105
"name":"keyword.other.module.haskell"
106
},
107
"3":{
108
"name":"keyword.other.signature.haskell"
109
}
110
},
111
"end":"(?=\\b(?<!')where\\b(?!'))",
112
"name":"meta.declaration.module.haskell",
113
"patterns":[
114
{
115
"include":"#comment_like"
116
},
117
{
118
"include":"#module_name"
119
},
120
{
121
"include":"#module_exports"
122
},
123
{
124
"match":"[a-z]+",
125
"name":"invalid"
126
}
127
]
128
},
129
{
130
"include":"#ffi"
131
},
132
{
133
"begin":"^(\\s*)(class)\\b((?!'))",
134
"beginCaptures":{
135
"2":{
136
"name":"keyword.other.class.haskell"
137
}
138
},
139
"end":"(?=(?<!')\\bwhere\\b(?!'))|(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
140
"name":"meta.declaration.class.haskell",
141
"patterns":[
142
{
143
"include":"#comment_like"
144
},
145
{
146
"include":"#where"
147
},
148
{
149
"include":"#type_signature"
150
}
151
]
152
},
153
{
154
"begin":"^(\\s*)(data|newtype)(?:\\s+(instance))?\\s+((?:(?!(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(?:=|--+)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])|\\b(?<!')(?:where|deriving)\\b(?!')|\\{-).)*)(?=\\b(?<!'')where\\b(?!''))",
155
"beginCaptures":{
156
"2":{
157
"name":"keyword.other.$2.haskell"
158
},
159
"3":{
160
"name":"keyword.other.instance.haskell"
161
},
162
"4":{
163
"patterns":[
164
{
165
"include":"#type_signature"
166
}
167
]
168
}
169
},
170
"end":"(?=(?<!')\\bderiving\\b(?!'))|(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
171
"name":"meta.declaration.$2.generalized.haskell",
172
"patterns":[
173
{
174
"include":"#comment_like"
175
},
176
{
177
"begin":"(?<!')\\b(where)\\s*(\\{)(?!-)",
178
"beginCaptures":{
179
"1":{
180
"name":"keyword.other.where.haskell"
181
},
182
"2":{
183
"name":"punctuation.brace.haskell"
184
}
185
},
186
"end":"(})",
187
"endCaptures":{
188
"1":{
189
"name":"punctuation.brace.haskell"
190
}
191
},
192
"patterns":[
193
{
194
"include":"#comment_like"
195
},
196
{
197
"include":"#gadt_constructor"
198
},
199
{
200
"match":";",
201
"name":"punctuation.semicolon.haskell"
202
}
203
]
204
},
205
{
206
"match":"\\b(?<!')(where)\\b(?!')",
207
"name":"keyword.other.where.haskell"
208
},
209
{
210
"include":"#deriving"
211
},
212
{
213
"include":"#gadt_constructor"
214
}
215
]
216
},
217
{
218
"include":"#role_annotation"
219
},
220
{
221
"begin":"^(\\s*)(pattern)\\s+(.*?)\\s+(::|∷)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])",
222
"beginCaptures":{
223
"2":{
224
"name":"keyword.other.pattern.haskell"
225
},
226
"3":{
227
"patterns":[
228
{
229
"include":"#comma"
230
},
231
{
232
"include":"#data_constructor"
233
}
234
]
235
},
236
"4":{
237
"name":"keyword.operator.double-colon.haskell"
238
}
239
},
240
"end":"(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
241
"name":"meta.declaration.pattern.type.haskell",
242
"patterns":[
243
{
244
"include":"#type_signature"
245
}
246
]
247
},
248
{
249
"begin":"^\\s*(pattern)\\b(?!')",
250
"captures":{
251
"1":{
252
"name":"keyword.other.pattern.haskell"
253
}
254
},
255
"end":"(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
256
"name":"meta.declaration.pattern.haskell",
257
"patterns":[
258
{
259
"include":"$self"
260
}
261
]
262
},
263
{
264
"begin":"^(\\s*)(data|newtype)(?:\\s+(family|instance))?\\s+(((?!(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(?:=|--+)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])|\\b(?<!')(?:where|deriving)\\b(?!')|\\{-).)*)",
265
"beginCaptures":{
266
"2":{
267
"name":"keyword.other.$2.haskell"
268
},
269
"3":{
270
"name":"keyword.other.$3.haskell"
271
},
272
"4":{
273
"patterns":[
274
{
275
"include":"#type_signature"
276
}
277
]
278
}
279
},
280
"end":"(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
281
"name":"meta.declaration.$2.algebraic.haskell",
282
"patterns":[
283
{
284
"include":"#comment_like"
285
},
286
{
287
"include":"#deriving"
288
},
289
{
290
"include":"#forall"
291
},
292
{
293
"include":"#adt_constructor"
294
},
295
{
296
"include":"#context"
297
},
298
{
299
"include":"#record_decl"
300
},
301
{
302
"include":"#type_signature"
303
}
304
]
305
},
306
{
307
"begin":"^(\\s*)(type)\\s+(family)\\b(?!')(((?!(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(?:=|--+)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])|\\b(?<!')where\\b(?!')|\\{-).)*)",
308
"beginCaptures":{
309
"2":{
310
"name":"keyword.other.type.haskell"
311
},
312
"3":{
313
"name":"keyword.other.family.haskell"
314
},
315
"4":{
316
"patterns":[
317
{
318
"include":"#comment_like"
319
},
320
{
321
"include":"#where"
322
},
323
{
324
"include":"#type_signature"
325
}
326
]
327
}
328
},
329
"end":"(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
330
"name":"meta.declaration.type.family.haskell",
331
"patterns":[
332
{
333
"include":"#comment_like"
334
},
335
{
336
"include":"#where"
337
},
338
{
339
"include":"#type_signature"
340
}
341
]
342
},
343
{
344
"begin":"^(\\s*)(type)(?:\\s+(instance))?\\s+(((?!(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(?:=|--+|::|∷)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])|\\{-).)*)",
345
"beginCaptures":{
346
"2":{
347
"name":"keyword.other.type.haskell"
348
},
349
"3":{
350
"name":"keyword.other.instance.haskell"
351
},
352
"4":{
353
"patterns":[
354
{
355
"include":"#type_signature"
356
}
357
]
358
}
359
},
360
"end":"(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
361
"name":"meta.declaration.type.haskell",
362
"patterns":[
363
{
364
"include":"#type_signature"
365
}
366
]
367
},
368
{
369
"begin":"^(\\s*)(instance)\\b((?!'))",
370
"beginCaptures":{
371
"2":{
372
"name":"keyword.other.instance.haskell"
373
}
374
},
375
"end":"(?=\\b(?<!')(where)\\b(?!'))|(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
376
"name":"meta.declaration.instance.haskell",
377
"patterns":[
378
{
379
"include":"#comment_like"
380
},
381
{
382
"include":"#where"
383
},
384
{
385
"include":"#type_signature"
386
}
387
]
388
},
389
{
390
"begin":"^(\\s*)(import)\\b((?!'))",
391
"beginCaptures":{
392
"2":{
393
"name":"keyword.other.import.haskell"
394
}
395
},
396
"end":"(?=\\b(?<!')(where)\\b(?!'))|(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
397
"name":"meta.import.haskell",
398
"patterns":[
399
{
400
"include":"#comment_like"
401
},
402
{
403
"include":"#where"
404
},
405
{
406
"captures":{
407
"1":{
408
"name":"keyword.other.$1.haskell"
409
}
410
},
411
"match":"(qualified|as|hiding)"
412
},
413
{
414
"include":"#module_name"
415
},
416
{
417
"include":"#module_exports"
418
}
419
]
420
},
421
{
422
"include":"#deriving"
423
},
424
{
425
"include":"#layout_herald"
426
},
427
{
428
"include":"#keyword"
429
},
430
{
431
"captures":{
432
"1":{
433
"name":"keyword.other.$1.haskell"
434
},
435
"2":{
436
"patterns":[
437
{
438
"include":"#comment_like"
439
},
440
{
441
"include":"#integer_literals"
442
},
443
{
444
"include":"#infix_op"
445
}
446
]
447
}
448
},
449
"match":"^\\s*(infix[lr]?)\\s+(.*)",
450
"name":"meta.fixity-declaration.haskell"
451
},
452
{
453
"include":"#overloaded_label"
454
},
455
{
456
"include":"#type_application"
457
},
458
{
459
"include":"#reserved_symbol"
460
},
461
{
462
"include":"#fun_decl"
463
},
464
{
465
"include":"#qualifier"
466
},
467
{
468
"include":"#data_constructor"
469
},
470
{
471
"include":"#start_type_signature"
472
},
473
{
474
"include":"#prefix_op"
475
},
476
{
477
"include":"#infix_op"
478
},
479
{
480
"begin":"(\\()(#)\\s",
481
"beginCaptures":{
482
"1":{
483
"name":"punctuation.paren.haskell"
484
},
485
"2":{
486
"name":"keyword.operator.hash.haskell"
487
}
488
},
489
"end":"(#)(\\))",
490
"endCaptures":{
491
"1":{
492
"name":"keyword.operator.hash.haskell"
493
},
494
"2":{
495
"name":"punctuation.paren.haskell"
496
}
497
},
498
"patterns":[
499
{
500
"include":"#comma"
501
},
502
{
503
"include":"$self"
504
}
505
]
506
},
507
{
508
"begin":"(\\()",
509
"beginCaptures":{
510
"1":{
511
"name":"punctuation.paren.haskell"
512
}
513
},
514
"end":"(\\))",
515
"endCaptures":{
516
"1":{
517
"name":"punctuation.paren.haskell"
518
}
519
},
520
"patterns":[
521
{
522
"include":"#comma"
523
},
524
{
525
"include":"$self"
526
}
527
]
528
},
529
{
530
"include":"#quasi_quote"
531
},
532
{
533
"begin":"(\\[)",
534
"beginCaptures":{
535
"1":{
536
"name":"punctuation.bracket.haskell"
537
}
538
},
539
"end":"(])",
540
"endCaptures":{
541
"1":{
542
"name":"punctuation.bracket.haskell"
543
}
544
},
545
"patterns":[
546
{
547
"include":"#comma"
548
},
549
{
550
"include":"$self"
551
}
552
]
553
},
554
{
555
"include":"#record"
556
}
557
],
558
"repository":{
559
"adt_constructor":{
560
"patterns":[
561
{
562
"include":"#comment_like"
563
},
564
{
565
"begin":"(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(?:(=)|(\\|))(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])",
566
"beginCaptures":{
567
"1":{
568
"name":"keyword.operator.eq.haskell"
569
},
570
"2":{
571
"name":"keyword.operator.pipe.haskell"
572
}
573
},
574
"end":"(?:\\G|^)\\s*(?:(?<!')\\b(['._\\p{Ll}\\p{Lu}\\p{Lt}\\d]+)|('?(?<paren>\\((?:[^()]?|\\g<paren>)*\\)))|('?(?<brac>\\((?:[^]\\[]?|\\g<brac>)*])))\\s*(?:(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(:[[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]*)|(`)([\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)(`))|(?<!')\\b([\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)|(\\()\\s*(:[[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]*)\\s*(\\))",
575
"endCaptures":{
576
"1":{
577
"patterns":[
578
{
579
"include":"#type_signature"
580
}
581
]
582
},
583
"10":{
584
"name":"constant.other.haskell"
585
},
586
"11":{
587
"name":"punctuation.paren.haskell"
588
},
589
"12":{
590
"name":"constant.other.operator.haskell"
591
},
592
"13":{
593
"name":"punctuation.paren.haskell"
594
},
595
"2":{
596
"patterns":[
597
{
598
"include":"#type_signature"
599
}
600
]
601
},
602
"4":{
603
"patterns":[
604
{
605
"include":"#type_signature"
606
}
607
]
608
},
609
"6":{
610
"name":"constant.other.operator.haskell"
611
},
612
"7":{
613
"name":"punctuation.backtick.haskell"
614
},
615
"8":{
616
"name":"constant.other.haskell"
617
},
618
"9":{
619
"name":"punctuation.backtick.haskell"
620
}
621
},
622
"patterns":[
623
{
624
"include":"#comment_like"
625
},
626
{
627
"include":"#deriving"
628
},
629
{
630
"include":"#record_decl"
631
},
632
{
633
"include":"#forall"
634
},
635
{
636
"include":"#context"
637
}
638
]
639
}
640
]
641
},
642
"block_comment":{
643
"applyEndPatternLast":1,
644
"begin":"\\{-",
645
"captures":{
646
"0":{
647
"name":"punctuation.definition.comment.haskell"
648
}
649
},
650
"end":"-}",
651
"name":"comment.block.haskell",
652
"patterns":[
653
{
654
"include":"#block_comment"
655
}
656
]
657
},
658
"char_literal":{
659
"captures":{
660
"1":{
661
"name":"punctuation.definition.string.begin.haskell"
662
},
663
"2":{
664
"name":"constant.character.escape.haskell"
665
},
666
"3":{
667
"name":"constant.character.escape.octal.haskell"
668
},
669
"4":{
670
"name":"constant.character.escape.hexadecimal.haskell"
671
},
672
"5":{
673
"name":"constant.character.escape.control.haskell"
674
},
675
"6":{
676
"name":"punctuation.definition.string.end.haskell"
677
}
678
},
679
"match":"(?<!['_\\p{Ll}\\p{Lu}\\p{Lt}\\d])(')(?:[ -\\[\\]-~]|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[\"\\&'\\\\abfnrtv]))|(\\\\o[0-7]+)|(\\\\x\\h+)|(\\\\\\^[@-_]))(')",
680
"name":"string.quoted.single.haskell"
681
},
682
"comma":{
683
"match":",",
684
"name":"punctuation.separator.comma.haskell"
685
},
686
"comment_like":{
687
"patterns":[
688
{
689
"include":"#cpp"
690
},
691
{
692
"include":"#pragma"
693
},
694
{
695
"include":"#comments"
696
}
697
]
698
},
699
"comments":{
700
"patterns":[
701
{
702
"begin":"^(\\s*)(--\\s[$|])",
703
"beginCaptures":{
704
"2":{
705
"name":"punctuation.whitespace.comment.leading.haskell"
706
}
707
},
708
"end":"(?=^(?!\\1--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])))",
709
"name":"comment.block.documentation.haskell"
710
},
711
{
712
"begin":"(^[\\t ]+)?(--\\s[*^])",
713
"beginCaptures":{
714
"1":{
715
"name":"punctuation.whitespace.comment.leading.haskell"
716
}
717
},
718
"end":"\\n",
719
"name":"comment.line.documentation.haskell"
720
},
721
{
722
"applyEndPatternLast":1,
723
"begin":"\\{-\\s?[$*^|]",
724
"captures":{
725
"0":{
726
"name":"punctuation.definition.comment.haskell"
727
}
728
},
729
"end":"-}",
730
"name":"comment.block.documentation.haskell",
731
"patterns":[
732
{
733
"include":"#block_comment"
734
}
735
]
736
},
737
{
738
"begin":"(^[\\t ]+)?(?=--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]))",
739
"beginCaptures":{
740
"1":{
741
"name":"punctuation.whitespace.comment.leading.haskell"
742
}
743
},
744
"end":"(?!\\G)",
745
"patterns":[
746
{
747
"begin":"--",
748
"beginCaptures":{
749
"0":{
750
"name":"punctuation.definition.comment.haskell"
751
}
752
},
753
"end":"\\n",
754
"name":"comment.line.double-dash.haskell"
755
}
756
]
757
},
758
{
759
"include":"#block_comment"
760
}
761
]
762
},
763
"context":{
764
"captures":{
765
"1":{
766
"patterns":[
767
{
768
"include":"#comment_like"
769
},
770
{
771
"include":"#type_signature"
772
}
773
]
774
},
775
"2":{
776
"name":"keyword.operator.big-arrow.haskell"
777
}
778
},
779
"match":"(.*)(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(=>|⇒)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])"
780
},
781
"cpp":{
782
"captures":{
783
"1":{
784
"name":"punctuation.definition.preprocessor.c"
785
}
786
},
787
"match":"^(#).*$",
788
"name":"meta.preprocessor.c"
789
},
790
"data_constructor":{
791
"match":"\\b(?<!')[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*(?!['.\\w])",
792
"name":"constant.other.haskell"
793
},
794
"deriving":{
795
"patterns":[
796
{
797
"begin":"^(\\s*)(deriving)\\s+(?:(via|stock|newtype|anyclass)\\s+)?",
798
"beginCaptures":{
799
"2":{
800
"name":"keyword.other.deriving.haskell"
801
},
802
"3":{
803
"name":"keyword.other.deriving.strategy.$3.haskell"
804
}
805
},
806
"end":"(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
807
"name":"meta.deriving.haskell",
808
"patterns":[
809
{
810
"include":"#comment_like"
811
},
812
{
813
"match":"(?<!')\\b(instance)\\b(?!')",
814
"name":"keyword.other.instance.haskell"
815
},
816
{
817
"captures":{
818
"1":{
819
"name":"keyword.other.deriving.strategy.$1.haskell"
820
}
821
},
822
"match":"(?<!')\\b(via|stock|newtype|anyclass)\\b(?!')"
823
},
824
{
825
"include":"#type_signature"
826
}
827
]
828
},
829
{
830
"begin":"(deriving)(?:\\s+(stock|newtype|anyclass))?\\s*(\\()",
831
"beginCaptures":{
832
"1":{
833
"name":"keyword.other.deriving.haskell"
834
},
835
"2":{
836
"name":"keyword.other.deriving.strategy.$2.haskell"
837
},
838
"3":{
839
"name":"punctuation.paren.haskell"
840
}
841
},
842
"end":"(\\))",
843
"endCaptures":{
844
"1":{
845
"name":"punctuation.paren.haskell"
846
}
847
},
848
"name":"meta.deriving.haskell",
849
"patterns":[
850
{
851
"include":"#type_signature"
852
}
853
]
854
},
855
{
856
"captures":{
857
"1":{
858
"name":"keyword.other.deriving.haskell"
859
},
860
"2":{
861
"name":"keyword.other.deriving.strategy.$2.haskell"
862
},
863
"3":{
864
"patterns":[
865
{
866
"include":"#type_signature"
867
}
868
]
869
},
870
"5":{
871
"name":"keyword.other.deriving.strategy.via.haskell"
872
},
873
"6":{
874
"patterns":[
875
{
876
"include":"#type_signature"
877
}
878
]
879
}
880
},
881
"match":"(deriving)(?:\\s+(stock|newtype|anyclass))?\\s+([\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)(\\s+(via)\\s+(.*)$)?",
882
"name":"meta.deriving.haskell"
883
},
884
{
885
"match":"(?<!')\\b(via)\\b(?!')",
886
"name":"keyword.other.deriving.strategy.via.haskell"
887
}
888
]
889
},
890
"double_colon":{
891
"captures":{
892
"1":{
893
"name":"keyword.operator.double-colon.haskell"
894
}
895
},
896
"match":"\\s*(::|∷)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])\\s*"
897
},
898
"export_constructs":{
899
"patterns":[
900
{
901
"include":"#comment_like"
902
},
903
{
904
"begin":"\\b(?<!')(pattern)\\b(?!')",
905
"beginCaptures":{
906
"1":{
907
"name":"keyword.other.pattern.haskell"
908
}
909
},
910
"end":"([\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)|(\\()\\s*(:[[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+)\\s*(\\))",
911
"endCaptures":{
912
"1":{
913
"name":"constant.other.haskell"
914
},
915
"2":{
916
"name":"punctuation.paren.haskell"
917
},
918
"3":{
919
"name":"constant.other.operator.haskell"
920
},
921
"4":{
922
"name":"punctuation.paren.haskell"
923
}
924
},
925
"patterns":[
926
{
927
"include":"#comment_like"
928
}
929
]
930
},
931
{
932
"begin":"\\b(?<!')(type)\\b(?!')",
933
"beginCaptures":{
934
"1":{
935
"name":"keyword.other.type.haskell"
936
}
937
},
938
"end":"([\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)|(\\()\\s*([[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+)\\s*(\\))",
939
"endCaptures":{
940
"1":{
941
"name":"storage.type.haskell"
942
},
943
"2":{
944
"name":"punctuation.paren.haskell"
945
},
946
"3":{
947
"name":"storage.type.operator.haskell"
948
},
949
"4":{
950
"name":"punctuation.paren.haskell"
951
}
952
},
953
"patterns":[
954
{
955
"include":"#comment_like"
956
}
957
]
958
},
959
{
960
"match":"(?<!')\\b[_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*",
961
"name":"entity.name.function.haskell"
962
},
963
{
964
"match":"(?<!')\\b[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*",
965
"name":"storage.type.haskell"
966
},
967
{
968
"include":"#record_wildcard"
969
},
970
{
971
"include":"#reserved_symbol"
972
},
973
{
974
"include":"#prefix_op"
975
}
976
]
977
},
978
"ffi":{
979
"begin":"^(\\s*)(foreign)\\s+((?:im|ex)port)\\s+",
980
"beginCaptures":{
981
"2":{
982
"name":"keyword.other.foreign.haskell"
983
},
984
"3":{
985
"name":"keyword.other.$3.haskell"
986
}
987
},
988
"end":"(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
989
"name":"meta.$3.foreign.haskell",
990
"patterns":[
991
{
992
"include":"#comment_like"
993
},
994
{
995
"captures":{
996
"1":{
997
"name":"keyword.other.calling-convention.$1.haskell"
998
}
999
},
1000
"match":"\\b(?<!')(ccall|cplusplus|dotnet|jvm|stdcall|prim|capi)\\s+"
1001
},
1002
{
1003
"begin":"(?=\")|(?=\\b(?<!')([_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)\\b(?!'))",
1004
"end":"(?=(::|∷)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]))",
1005
"patterns":[
1006
{
1007
"include":"#comment_like"
1008
},
1009
{
1010
"captures":{
1011
"1":{
1012
"name":"keyword.other.safety.$1.haskell"
1013
},
1014
"2":{
1015
"name":"entity.name.foreign.haskell",
1016
"patterns":[
1017
{
1018
"include":"#string_literal"
1019
}
1020
]
1021
},
1022
"3":{
1023
"name":"entity.name.function.haskell"
1024
},
1025
"4":{
1026
"name":"entity.name.function.infix.haskell"
1027
}
1028
},
1029
"match":"\\b(?<!')(safe|unsafe|interruptible)\\b(?!')\\s*(\"(?:\\\\\"|[^\"])*\")?\\s*(?:\\b(?<!'')([_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)\\b(?!')|\\(\\s*(?!--+\\))([[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+)\\s*\\))"
1030
},
1031
{
1032
"captures":{
1033
"1":{
1034
"name":"keyword.other.safety.$1.haskell"
1035
},
1036
"2":{
1037
"name":"entity.name.foreign.haskell",
1038
"patterns":[
1039
{
1040
"include":"#string_literal"
1041
}
1042
]
1043
}
1044
},
1045
"match":"\\b(?<!')(safe|unsafe|interruptible)\\b(?!')\\s*(\"(?:\\\\\"|[^\"])*\")?\\s*$"
1046
},
1047
{
1048
"captures":{
1049
"0":{
1050
"name":"entity.name.foreign.haskell",
1051
"patterns":[
1052
{
1053
"include":"#string_literal"
1054
}
1055
]
1056
}
1057
},
1058
"match":"\"(?:\\\\\"|[^\"])*\""
1059
},
1060
{
1061
"captures":{
1062
"1":{
1063
"name":"entity.name.function.haskell"
1064
},
1065
"2":{
1066
"name":"punctuation.paren.haskell"
1067
},
1068
"3":{
1069
"name":"entity.name.function.infix.haskell"
1070
},
1071
"4":{
1072
"name":"punctuation.paren.haskell"
1073
}
1074
},
1075
"match":"\\b(?<!'')([_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)\\b(?!')|(\\()\\s*(?!--+\\))([[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+)\\s*(\\))"
1076
}
1077
]
1078
},
1079
{
1080
"include":"#double_colon"
1081
},
1082
{
1083
"include":"#type_signature"
1084
}
1085
]
1086
},
1087
"float_literals":{
1088
"captures":{
1089
"1":{
1090
"name":"constant.numeric.floating.decimal.haskell"
1091
},
1092
"2":{
1093
"name":"constant.numeric.floating.hexadecimal.haskell"
1094
}
1095
},
1096
"match":"\\b(?<!')(?:([0-9][0-9_]*\\.[0-9][0-9_]*(?:[Ee][-+]?[0-9][0-9_]*)?|[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*)|(0(?:[Xx]_*\\h[_\\h]*\\.\\h[_\\h]*(?:[Pp][-+]?[0-9][0-9_]*)?|[Xx]_*\\h[_\\h]*[Pp][-+]?[0-9][0-9_]*)))\\b(?!')"
1097
},
1098
"forall":{
1099
"begin":"\\b(?<!')(forall|∀)\\b(?!')",
1100
"beginCaptures":{
1101
"1":{
1102
"name":"keyword.other.forall.haskell"
1103
}
1104
},
1105
"end":"(\\.)|(->|→)",
1106
"endCaptures":{
1107
"1":{
1108
"name":"keyword.operator.period.haskell"
1109
},
1110
"2":{
1111
"name":"keyword.operator.arrow.haskell"
1112
}
1113
},
1114
"patterns":[
1115
{
1116
"include":"#comment_like"
1117
},
1118
{
1119
"include":"#type_variable"
1120
},
1121
{
1122
"include":"#type_signature"
1123
}
1124
]
1125
},
1126
"fun_decl":{
1127
"begin":"^(\\s*)(?<fn>(?:[_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*#*|\\(\\s*(?!--+\\))[[\\p{S}\\p{P}]&&[^]\"'(),:;\\[_`{}]][[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]*\\s*\\))(?:\\s*,\\s*\\g<fn>)?)\\s*(?<![[\\p{S}\\p{P}]&&[^]\"'),;_`}]])(::|∷)(?![[\\p{S}\\p{P}]&&[^\"'(,;\\[_`{]])",
1128
"beginCaptures":{
1129
"2":{
1130
"name":"entity.name.function.haskell",
1131
"patterns":[
1132
{
1133
"include":"#reserved_symbol"
1134
},
1135
{
1136
"include":"#prefix_op"
1137
}
1138
]
1139
},
1140
"3":{
1141
"name":"keyword.operator.double-colon.haskell"
1142
}
1143
},
1144
"end":"(?=(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])((<-|←)|(=)|(-<|↢)|(-<<|⤛))([]\"'(),;\\[_`{}[^\\p{S}\\p{P}]]))|(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
1145
"name":"meta.function.type-declaration.haskell",
1146
"patterns":[
1147
{
1148
"include":"#type_signature"
1149
}
1150
]
1151
},
1152
"gadt_constructor":{
1153
"patterns":[
1154
{
1155
"begin":"^(\\s*)(?:\\b((?<!')[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)|(\\()\\s*(:[[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]*)\\s*(\\)))",
1156
"beginCaptures":{
1157
"2":{
1158
"name":"constant.other.haskell"
1159
},
1160
"3":{
1161
"name":"punctuation.paren.haskell"
1162
},
1163
"4":{
1164
"name":"constant.other.operator.haskell"
1165
},
1166
"5":{
1167
"name":"punctuation.paren.haskell"
1168
}
1169
},
1170
"end":"(?=\\b(?<!'')deriving\\b(?!'))|(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
1171
"patterns":[
1172
{
1173
"include":"#comment_like"
1174
},
1175
{
1176
"include":"#deriving"
1177
},
1178
{
1179
"include":"#double_colon"
1180
},
1181
{
1182
"include":"#record_decl"
1183
},
1184
{
1185
"include":"#type_signature"
1186
}
1187
]
1188
},
1189
{
1190
"begin":"\\b((?<!')[\\p{Lu}\\p{Lt}][_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)|(\\()\\s*(:[[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]*)\\s*(\\))",
1191
"beginCaptures":{
1192
"1":{
1193
"name":"constant.other.haskell"
1194
},
1195
"2":{
1196
"name":"punctuation.paren.haskell"
1197
},
1198
"3":{
1199
"name":"constant.other.operator.haskell"
1200
},
1201
"4":{
1202
"name":"punctuation.paren.haskell"
1203
}
1204
},
1205
"end":"$",
1206
"patterns":[
1207
{
1208
"include":"#comment_like"
1209
},
1210
{
1211
"include":"#deriving"
1212
},
1213
{
1214
"include":"#double_colon"
1215
},
1216
{
1217
"include":"#record_decl"
1218
},
1219
{
1220
"include":"#type_signature"
1221
}
1222
]
1223
}
1224
]
1225
},
1226
"infix_op":{
1227
"patterns":[
1228
{
1229
"captures":{
1230
"1":{
1231
"name":"keyword.operator.promotion.haskell"
1232
},
1233
"2":{
1234
"name":"entity.name.namespace.haskell"
1235
},
1236
"3":{
1237
"name":"keyword.operator.infix.haskell"
1238
}
1239
},
1240
"match":"((?:(?<!'')('')?[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*\\.)*)(#+|[[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+(?<!#))"
1241
},
1242
{
1243
"captures":{
1244
"1":{
1245
"name":"punctuation.backtick.haskell"
1246
},
1247
"2":{
1248
"name":"entity.name.namespace.haskell"
1249
},
1250
"3":{
1251
"patterns":[
1252
{
1253
"include":"#data_constructor"
1254
}
1255
]
1256
},
1257
"4":{
1258
"name":"punctuation.backtick.haskell"
1259
}
1260
},
1261
"match":"(`)((?:[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*\\.)*)([_\\p{Ll}\\p{Lu}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)(`)",
1262
"name":"keyword.operator.function.infix.haskell"
1263
}
1264
]
1265
},
1266
"inline_phase":{
1267
"begin":"\\[",
1268
"beginCaptures":{
1269
"0":{
1270
"name":"punctuation.bracket.haskell"
1271
}
1272
},
1273
"end":"]",
1274
"endCaptures":{
1275
"0":{
1276
"name":"punctuation.bracket.haskell"
1277
}
1278
},
1279
"name":"meta.inlining-phase.haskell",
1280
"patterns":[
1281
{
1282
"match":"~",
1283
"name":"punctuation.tilde.haskell"
1284
},
1285
{
1286
"include":"#integer_literals"
1287
},
1288
{
1289
"match":"\\w*",
1290
"name":"invalid"
1291
}
1292
]
1293
},
1294
"integer_literals":{
1295
"captures":{
1296
"1":{
1297
"name":"constant.numeric.integral.decimal.haskell"
1298
},
1299
"2":{
1300
"name":"constant.numeric.integral.hexadecimal.haskell"
1301
},
1302
"3":{
1303
"name":"constant.numeric.integral.octal.haskell"
1304
},
1305
"4":{
1306
"name":"constant.numeric.integral.binary.haskell"
1307
}
1308
},
1309
"match":"\\b(?<!')(?:([0-9][0-9_]*)|(0[Xx]_*\\h[_\\h]*)|(0[Oo]_*[0-7][0-7_]*)|(0[Bb]_*[01][01_]*))\\b(?!')"
1310
},
1311
"keyword":{
1312
"captures":{
1313
"1":{
1314
"name":"keyword.other.$1.haskell"
1315
},
1316
"2":{
1317
"name":"keyword.control.$2.haskell"
1318
}
1319
},
1320
"match":"\\b(?<!')(?:(where|let|in|default)|(m?do|if|then|else|case|of|proc|rec))\\b(?!')"
1321
},
1322
"layout_herald":{
1323
"begin":"(?<!')\\b(?:(where|let|m?do)|(of))\\s*(\\{)(?!-)",
1324
"beginCaptures":{
1325
"1":{
1326
"name":"keyword.other.$1.haskell"
1327
},
1328
"2":{
1329
"name":"keyword.control.of.haskell"
1330
},
1331
"3":{
1332
"name":"punctuation.brace.haskell"
1333
}
1334
},
1335
"end":"(})",
1336
"endCaptures":{
1337
"1":{
1338
"name":"punctuation.brace.haskell"
1339
}
1340
},
1341
"patterns":[
1342
{
1343
"include":"$self"
1344
},
1345
{
1346
"match":";",
1347
"name":"punctuation.semicolon.haskell"
1348
}
1349
]
1350
},
1351
"liquid_haskell":{
1352
"begin":"\\{-@",
1353
"end":"@-}",
1354
"name":"block.liquidhaskell.haskell",
1355
"patterns":[
1356
{
1357
"include":"$self"
1358
}
1359
]
1360
},
1361
"module_exports":{
1362
"applyEndPatternLast":1,
1363
"begin":"\\(",
1364
"beginCaptures":{
1365
"0":{
1366
"name":"punctuation.paren.haskell"
1367
}
1368
},
1369
"end":"\\)",
1370
"endCaptures":{
1371
"0":{
1372
"name":"punctuation.paren.haskell"
1373
}
1374
},
1375
"name":"meta.declaration.exports.haskell",
1376
"patterns":[
1377
{
1378
"include":"#comment_like"
1379
},
1380
{
1381
"captures":{
1382
"1":{
1383
"name":"keyword.other.module.haskell"
1384
}
1385
},
1386
"match":"\\b(?<!')(module)\\b(?!')"
1387
},
1388
{
1389
"include":"#comma"
1390
},
1391
{
1392
"include":"#export_constructs"
1393
},
1394
{
1395
"begin":"\\(",
1396
"beginCaptures":{
1397
"0":{
1398
"name":"punctuation.paren.haskell"
1399
}
1400
},
1401
"end":"\\)",
1402
"endCaptures":{
1403
"0":{
1404
"name":"punctuation.paren.haskell"
1405
}
1406
},
1407
"patterns":[
1408
{
1409
"include":"#comment_like"
1410
},
1411
{
1412
"include":"#record_wildcard"
1413
},
1414
{
1415
"include":"#export_constructs"
1416
},
1417
{
1418
"include":"#comma"
1419
}
1420
]
1421
}
1422
]
1423
},
1424
"module_name":{
1425
"match":"(?<conid>[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*(\\.\\g<conid>)?)",
1426
"name":"entity.name.namespace.haskell"
1427
},
1428
"numeric_literals":{
1429
"patterns":[
1430
{
1431
"include":"#float_literals"
1432
},
1433
{
1434
"include":"#integer_literals"
1435
}
1436
]
1437
},
1438
"overloaded_label":{
1439
"patterns":[
1440
{
1441
"captures":{
1442
"1":{
1443
"name":"keyword.operator.prefix.hash.haskell"
1444
},
1445
"2":{
1446
"patterns":[
1447
{
1448
"include":"#string_literal"
1449
}
1450
]
1451
}
1452
},
1453
"match":"(?<![[_\\p{Ll}\\p{Lu}\\p{Lt}\\d\\p{S}\\p{P}]&&[^(,;\\[`{]])(#)(?:(\"(?:\\\\\"|[^\"])*\")|['._\\p{Ll}\\p{Lu}\\p{Lt}\\d]+)",
1454
"name":"entity.name.label.haskell"
1455
}
1456
]
1457
},
1458
"pragma":{
1459
"begin":"\\{-#",
1460
"end":"#-}",
1461
"name":"meta.preprocessor.haskell",
1462
"patterns":[
1463
{
1464
"begin":"(?i)\\b(?<!')(LANGUAGE)\\b(?!')",
1465
"beginCaptures":{
1466
"1":{
1467
"name":"keyword.other.preprocessor.pragma.haskell"
1468
}
1469
},
1470
"end":"(?=#-})",
1471
"patterns":[
1472
{
1473
"match":"(?:No)?(?:AutoDeriveTypeable|DatatypeContexts|DoRec|IncoherentInstances|MonadFailDesugaring|MonoPatBinds|NullaryTypeClasses|OverlappingInstances|PatternSignatures|RecordPuns|RelaxedPolyRec)",
1474
"name":"invalid.deprecated"
1475
},
1476
{
1477
"captures":{
1478
"1":{
1479
"name":"keyword.other.preprocessor.extension.haskell"
1480
}
1481
},
1482
"match":"((?:No)?(?:AllowAmbiguousTypes|AlternativeLayoutRule|AlternativeLayoutRuleTransitional|Arrows|BangPatterns|BinaryLiterals|CApiFFI|CPP|CUSKs|ConstrainedClassMethods|ConstraintKinds|DataKinds|DefaultSignatures|DeriveAnyClass|DeriveDataTypeable|DeriveFoldable|DeriveFunctor|DeriveGeneric|DeriveLift|DeriveTraversable|DerivingStrategies|DerivingVia|DisambiguateRecordFields|DoAndIfThenElse|BlockArguments|DuplicateRecordFields|EmptyCase|EmptyDataDecls|EmptyDataDeriving|ExistentialQuantification|ExplicitForAll|ExplicitNamespaces|ExtendedDefaultRules|FlexibleContexts|FlexibleInstances|ForeignFunctionInterface|FunctionalDependencies|GADTSyntax|GADTs|GHCForeignImportPrim|Generali[sz]edNewtypeDeriving|ImplicitParams|ImplicitPrelude|ImportQualifiedPost|ImpredicativeTypes|TypeFamilyDependencies|InstanceSigs|ApplicativeDo|InterruptibleFFI|JavaScriptFFI|KindSignatures|LambdaCase|LiberalTypeSynonyms|MagicHash|MonadComprehensions|MonoLocalBinds|MonomorphismRestriction|MultiParamTypeClasses|MultiWayIf|NumericUnderscores|NPlusKPatterns|NamedFieldPuns|NamedWildCards|NegativeLiterals|HexFloatLiterals|NondecreasingIndentation|NumDecimals|OverloadedLabels|OverloadedLists|OverloadedStrings|PackageImports|ParallelArrays|ParallelListComp|PartialTypeSignatures|PatternGuards|PatternSynonyms|PolyKinds|PolymorphicComponents|QuantifiedConstraints|PostfixOperators|QuasiQuotes|Rank2Types|RankNTypes|RebindableSyntax|RecordWildCards|RecursiveDo|RelaxedLayout|RoleAnnotations|ScopedTypeVariables|StandaloneDeriving|StarIsType|StaticPointers|Strict|StrictData|TemplateHaskell|TemplateHaskellQuotes|StandaloneKindSignatures|TraditionalRecordSyntax|TransformListComp|TupleSections|TypeApplications|TypeInType|TypeFamilies|TypeOperators|TypeSynonymInstances|UnboxedTuples|UnboxedSums|UndecidableInstances|UndecidableSuperClasses|UnicodeSyntax|UnliftedFFITypes|UnliftedNewtypes|ViewPatterns))"
1483
},
1484
{
1485
"include":"#comma"
1486
}
1487
]
1488
},
1489
{
1490
"begin":"(?i)\\b(?<!')(SPECIALI[SZ]E)(?:\\s*(\\[[^]\\[]*])?\\s*|\\s+)(instance)\\b(?!')",
1491
"beginCaptures":{
1492
"1":{
1493
"name":"keyword.other.preprocessor.pragma.haskell"
1494
},
1495
"2":{
1496
"patterns":[
1497
{
1498
"include":"#inline_phase"
1499
}
1500
]
1501
},
1502
"3":{
1503
"name":"keyword.other.instance.haskell"
1504
}
1505
},
1506
"end":"(?=#-})",
1507
"patterns":[
1508
{
1509
"include":"#type_signature"
1510
}
1511
]
1512
},
1513
{
1514
"begin":"(?i)\\b(?<!')(SPECIALI[SZ]E)\\b(?!')(?:\\s+(INLINE)\\b(?!'))?\\s*(\\[[^]\\[]*])?\\s*",
1515
"beginCaptures":{
1516
"1":{
1517
"name":"keyword.other.preprocessor.pragma.haskell"
1518
},
1519
"2":{
1520
"name":"keyword.other.preprocessor.pragma.haskell"
1521
},
1522
"3":{
1523
"patterns":[
1524
{
1525
"include":"#inline_phase"
1526
}
1527
]
1528
}
1529
},
1530
"end":"(?=#-})",
1531
"patterns":[
1532
{
1533
"include":"$self"
1534
}
1535
]
1536
},
1537
{
1538
"match":"(?i)\\b(?<!')(LANGUAGE|OPTIONS_GHC|INCLUDE|MINIMAL|UNPACK|OVERLAPS|INCOHERENT|NOUNPACK|SOURCE|OVERLAPPING|OVERLAPPABLE|INLINE|NOINLINE|INLINE?ABLE|CONLIKE|LINE|COLUMN|RULES|COMPLETE)\\b(?!')",
1539
"name":"keyword.other.preprocessor.haskell"
1540
},
1541
{
1542
"begin":"(?i)\\b(DEPRECATED|WARNING)\\b",
1543
"beginCaptures":{
1544
"1":{
1545
"name":"keyword.other.preprocessor.pragma.haskell"
1546
}
1547
},
1548
"end":"(?=#-})",
1549
"patterns":[
1550
{
1551
"include":"#string_literal"
1552
}
1553
]
1554
}
1555
]
1556
},
1557
"prefix_op":{
1558
"patterns":[
1559
{
1560
"captures":{
1561
"1":{
1562
"name":"punctuation.paren.haskell"
1563
},
1564
"2":{
1565
"name":"entity.name.function.infix.haskell"
1566
},
1567
"3":{
1568
"name":"punctuation.paren.haskell"
1569
}
1570
},
1571
"match":"(\\()\\s*(?!(?:--+|\\.\\.)\\))(#+|[[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+(?<!#))\\s*(\\))"
1572
}
1573
]
1574
},
1575
"qualifier":{
1576
"match":"\\b(?<!')[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*\\.",
1577
"name":"entity.name.namespace.haskell"
1578
},
1579
"quasi_quote":{
1580
"patterns":[
1581
{
1582
"begin":"(\\[)([dep])?(\\|\\|?)",
1583
"beginCaptures":{
1584
"1":{
1585
"name":"keyword.operator.quasi-quotation.begin.haskell"
1586
},
1587
"2":{
1588
"name":"entity.name.quasi-quoter.haskell"
1589
},
1590
"3":{
1591
"name":"keyword.operator.quasi-quotation.begin.haskell"
1592
}
1593
},
1594
"end":"\\3]",
1595
"endCaptures":{
1596
"0":{
1597
"name":"keyword.operator.quasi-quotation.end.haskell"
1598
}
1599
},
1600
"name":"meta.quasi-quotation.haskell",
1601
"patterns":[
1602
{
1603
"include":"$self"
1604
}
1605
]
1606
},
1607
{
1608
"begin":"(\\[)(t)(\\|\\|?)",
1609
"beginCaptures":{
1610
"1":{
1611
"name":"keyword.operator.quasi-quotation.begin.haskell"
1612
},
1613
"2":{
1614
"name":"entity.name.quasi-quoter.haskell"
1615
},
1616
"3":{
1617
"name":"keyword.operator.quasi-quotation.begin.haskell"
1618
}
1619
},
1620
"end":"\\3]",
1621
"endCaptures":{
1622
"0":{
1623
"name":"keyword.operator.quasi-quotation.end.haskell"
1624
}
1625
},
1626
"name":"meta.quasi-quotation.haskell",
1627
"patterns":[
1628
{
1629
"include":"#type_signature"
1630
}
1631
]
1632
},
1633
{
1634
"begin":"(\\[)(?:(\\$\\$)|(\\$))?(['._[^\\s\\p{S}\\p{P}]]*)(\\|\\|?)",
1635
"beginCaptures":{
1636
"1":{
1637
"name":"keyword.operator.quasi-quotation.begin.haskell"
1638
},
1639
"2":{
1640
"name":"keyword.operator.prefix.double-dollar.haskell"
1641
},
1642
"3":{
1643
"name":"keyword.operator.prefix.dollar.haskell"
1644
},
1645
"4":{
1646
"name":"entity.name.quasi-quoter.haskell",
1647
"patterns":[
1648
{
1649
"include":"#qualifier"
1650
}
1651
]
1652
},
1653
"5":{
1654
"name":"keyword.operator.quasi-quotation.begin.haskell"
1655
}
1656
},
1657
"end":"\\5]",
1658
"endCaptures":{
1659
"0":{
1660
"name":"keyword.operator.quasi-quotation.end.haskell"
1661
}
1662
},
1663
"name":"meta.quasi-quotation.haskell"
1664
}
1665
]
1666
},
1667
"record":{
1668
"begin":"(\\{)(?!-)",
1669
"beginCaptures":{
1670
"1":{
1671
"name":"punctuation.brace.haskell"
1672
}
1673
},
1674
"end":"(?<!-)(})",
1675
"endCaptures":{
1676
"1":{
1677
"name":"punctuation.brace.haskell"
1678
}
1679
},
1680
"name":"meta.record.haskell",
1681
"patterns":[
1682
{
1683
"include":"#comment_like"
1684
},
1685
{
1686
"include":"#record_field"
1687
}
1688
]
1689
},
1690
"record_decl":{
1691
"begin":"(\\{)(?!-)",
1692
"beginCaptures":{
1693
"1":{
1694
"name":"punctuation.brace.haskell"
1695
}
1696
},
1697
"end":"(?<!-)(})",
1698
"endCaptures":{
1699
"1":{
1700
"name":"punctuation.brace.haskell"
1701
}
1702
},
1703
"name":"meta.record.definition.haskell",
1704
"patterns":[
1705
{
1706
"include":"#comment_like"
1707
},
1708
{
1709
"include":"#record_decl_field"
1710
}
1711
]
1712
},
1713
"record_decl_field":{
1714
"begin":"([_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)|(\\()\\s*([[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+)\\s*(\\))",
1715
"beginCaptures":{
1716
"1":{
1717
"name":"variable.other.member.definition.haskell"
1718
},
1719
"2":{
1720
"name":"punctuation.paren.haskell"
1721
},
1722
"3":{
1723
"name":"variable.other.member.definition.haskell"
1724
},
1725
"4":{
1726
"name":"punctuation.paren.haskell"
1727
}
1728
},
1729
"end":"(,)|(?=})",
1730
"endCaptures":{
1731
"1":{
1732
"name":"punctuation.comma.haskell"
1733
}
1734
},
1735
"patterns":[
1736
{
1737
"include":"#comment_like"
1738
},
1739
{
1740
"include":"#comma"
1741
},
1742
{
1743
"include":"#double_colon"
1744
},
1745
{
1746
"include":"#type_signature"
1747
},
1748
{
1749
"include":"#record_decl_field"
1750
}
1751
]
1752
},
1753
"record_field":{
1754
"patterns":[
1755
{
1756
"begin":"([_\\p{Ll}\\p{Lu}]['._\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)|(\\()\\s*([[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+)\\s*(\\))",
1757
"beginCaptures":{
1758
"1":{
1759
"name":"variable.other.member.haskell",
1760
"patterns":[
1761
{
1762
"include":"#qualifier"
1763
}
1764
]
1765
},
1766
"2":{
1767
"name":"punctuation.paren.haskell"
1768
},
1769
"3":{
1770
"name":"variable.other.member.haskell"
1771
},
1772
"4":{
1773
"name":"punctuation.paren.haskell"
1774
}
1775
},
1776
"end":"(,)|(?=})",
1777
"endCaptures":{
1778
"1":{
1779
"name":"punctuation.comma.haskell"
1780
}
1781
},
1782
"patterns":[
1783
{
1784
"include":"#comment_like"
1785
},
1786
{
1787
"include":"#comma"
1788
},
1789
{
1790
"include":"$self"
1791
}
1792
]
1793
},
1794
{
1795
"include":"#record_wildcard"
1796
}
1797
]
1798
},
1799
"record_wildcard":{
1800
"captures":{
1801
"1":{
1802
"name":"variable.other.member.wildcard.haskell"
1803
}
1804
},
1805
"match":"(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(\\.\\.)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])"
1806
},
1807
"reserved_symbol":{
1808
"patterns":[
1809
{
1810
"captures":{
1811
"1":{
1812
"name":"keyword.operator.double-dot.haskell"
1813
},
1814
"10":{
1815
"name":"keyword.operator.arrow.tail.haskell"
1816
},
1817
"11":{
1818
"name":"keyword.operator.arrow.tail.double.haskell"
1819
},
1820
"12":{
1821
"name":"keyword.other.forall.haskell"
1822
},
1823
"2":{
1824
"name":"keyword.operator.colon.haskell"
1825
},
1826
"3":{
1827
"name":"keyword.operator.eq.haskell"
1828
},
1829
"4":{
1830
"name":"keyword.operator.lambda.haskell"
1831
},
1832
"5":{
1833
"name":"keyword.operator.pipe.haskell"
1834
},
1835
"6":{
1836
"name":"keyword.operator.arrow.left.haskell"
1837
},
1838
"7":{
1839
"name":"keyword.operator.arrow.haskell"
1840
},
1841
"8":{
1842
"name":"keyword.operator.arrow.left.tail.haskell"
1843
},
1844
"9":{
1845
"name":"keyword.operator.arrow.left.tail.double.haskell"
1846
}
1847
},
1848
"match":"(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(?:(\\.\\.)|(:)|(=)|(\\\\)|(\\|)|(<-|←)|(->|→)|(-<|↢)|(-<<|⤛)|(>-|⤚)|(>>-|⤜)|(∀))(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])"
1849
},
1850
{
1851
"captures":{
1852
"1":{
1853
"name":"keyword.operator.postfix.hash.haskell"
1854
}
1855
},
1856
"match":"(?<=[[_\\p{Ll}\\p{Lu}\\p{Lt}\\d\\p{S}\\p{P}]&&[^#,;\\[`{]])(#+)(?![[_\\p{Ll}\\p{Lu}\\p{Lt}\\d\\p{S}\\p{P}]&&[^]),;`}]])"
1857
},
1858
{
1859
"captures":{
1860
"1":{
1861
"name":"keyword.operator.infix.tight.at.haskell"
1862
}
1863
},
1864
"match":"(?<=[])_}\\p{Ll}\\p{Lu}\\p{Lt}\\d])(@)(?=[(\\[_{\\p{Ll}\\p{Lu}\\p{Lt}\\d])"
1865
},
1866
{
1867
"captures":{
1868
"1":{
1869
"name":"keyword.operator.prefix.tilde.haskell"
1870
},
1871
"2":{
1872
"name":"keyword.operator.prefix.bang.haskell"
1873
},
1874
"3":{
1875
"name":"keyword.operator.prefix.minus.haskell"
1876
},
1877
"4":{
1878
"name":"keyword.operator.prefix.dollar.haskell"
1879
},
1880
"5":{
1881
"name":"keyword.operator.prefix.double-dollar.haskell"
1882
}
1883
},
1884
"match":"(?<![[_\\p{Ll}\\p{Lu}\\p{Lt}\\d\\p{S}\\p{P}]&&[^(,;\\[`{]])(?:(~)|(!)|(-)|(\\$)|(\\$\\$))(?=[(\\[_{\\p{Ll}\\p{Lu}\\p{Lt}\\d])"
1885
}
1886
]
1887
},
1888
"role_annotation":{
1889
"patterns":[
1890
{
1891
"begin":"^(\\s*)(type)\\s+(role)\\b(?!')",
1892
"beginCaptures":{
1893
"2":{
1894
"name":"keyword.other.type.haskell"
1895
},
1896
"3":{
1897
"name":"keyword.other.role.haskell"
1898
}
1899
},
1900
"end":"(?=[;}])|^(?!\\1\\s+\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$))",
1901
"name":"meta.role-annotation.haskell",
1902
"patterns":[
1903
{
1904
"include":"#comment_like"
1905
},
1906
{
1907
"include":"#type_constructor"
1908
},
1909
{
1910
"captures":{
1911
"1":{
1912
"name":"keyword.other.role.$1.haskell"
1913
}
1914
},
1915
"match":"\\b(?<!')(nominal|representational|phantom)\\b(?!')"
1916
}
1917
]
1918
}
1919
]
1920
},
1921
"start_type_signature":{
1922
"patterns":[
1923
{
1924
"begin":"^(\\s*)(::|∷)(?![[\\p{S}\\p{P}]&&[^\"'(,;\\[_`{]])\\s*",
1925
"beginCaptures":{
1926
"2":{
1927
"name":"keyword.operator.double-colon.haskell"
1928
}
1929
},
1930
"end":"(?=#?\\)|[],]|(?<!')\\b(in|then|else|of)\\b(?!')|(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(?:([\\\\λ])|(<-|←)|(=)|(-<|↢)|(-<<|⤛))([]\"'(),;\\[_`{}[^\\p{S}\\p{P}]])|([#@])-}|(?=[;}])|^(?!\\1\\s*\\S|\\s*(?:$|\\{-[^@]|--+(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]).*$)))",
1931
"name":"meta.type-declaration.haskell",
1932
"patterns":[
1933
{
1934
"include":"#type_signature"
1935
}
1936
]
1937
},
1938
{
1939
"begin":"(?<![[\\p{S}\\p{P}]&&[^\"'(,;\\[_`{]])(::|∷)(?![[\\p{S}\\p{P}]&&[^\"'(,;\\[_`{]])",
1940
"beginCaptures":{
1941
"1":{
1942
"name":"keyword.operator.double-colon.haskell"
1943
}
1944
},
1945
"end":"(?=#?\\)|[],]|\\b(?<!')(in|then|else|of)\\b(?!')|([#@])-}|(?<![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])(?:([\\\\λ])|(<-|←)|(=)|(-<|↢)|(-<<|⤛))([]\"'(),;\\[_`{}[^\\p{S}\\p{P}]])|(?=[;}])|$)",
1946
"patterns":[
1947
{
1948
"include":"#type_signature"
1949
}
1950
]
1951
}
1952
]
1953
},
1954
"string_literal":{
1955
"begin":"\"",
1956
"beginCaptures":{
1957
"0":{
1958
"name":"punctuation.definition.string.begin.haskell"
1959
}
1960
},
1961
"end":"\"",
1962
"endCaptures":{
1963
"0":{
1964
"name":"punctuation.definition.string.end.haskell"
1965
}
1966
},
1967
"name":"string.quoted.double.haskell",
1968
"patterns":[
1969
{
1970
"match":"\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[\"\\&'\\\\abfnrtv])",
1971
"name":"constant.character.escape.haskell"
1972
},
1973
{
1974
"match":"\\\\(?:o[0-7]+|x\\h+|[0-9]+)",
1975
"name":"constant.character.escape.octal.haskell"
1976
},
1977
{
1978
"match":"\\\\\\^[@-_]",
1979
"name":"constant.character.escape.control.haskell"
1980
},
1981
{
1982
"begin":"\\\\\\s",
1983
"beginCaptures":{
1984
"0":{
1985
"name":"constant.character.escape.begin.haskell"
1986
}
1987
},
1988
"end":"\\\\",
1989
"endCaptures":{
1990
"0":{
1991
"name":"constant.character.escape.end.haskell"
1992
}
1993
},
1994
"patterns":[
1995
{
1996
"match":"\\S+",
1997
"name":"invalid.illegal.character-not-allowed-here.haskell"
1998
}
1999
]
2000
}
2001
]
2002
},
2003
"type_application":{
2004
"patterns":[
2005
{
2006
"begin":"(?<=[]\",;\\[{}\\s])(@)(')?(\\()",
2007
"beginCaptures":{
2008
"1":{
2009
"name":"keyword.operator.prefix.at.haskell"
2010
},
2011
"2":{
2012
"name":"keyword.operator.promotion.haskell"
2013
},
2014
"3":{
2015
"name":"punctuation.paren.haskell"
2016
}
2017
},
2018
"end":"\\)",
2019
"endCaptures":{
2020
"0":{
2021
"name":"punctuation.paren.haskell"
2022
}
2023
},
2024
"name":"meta.type-application.haskell",
2025
"patterns":[
2026
{
2027
"include":"#type_signature"
2028
}
2029
]
2030
},
2031
{
2032
"begin":"(?<=[]\",;\\[{}\\s])(@)(')?(\\[)",
2033
"beginCaptures":{
2034
"1":{
2035
"name":"keyword.operator.prefix.at.haskell"
2036
},
2037
"2":{
2038
"name":"keyword.operator.promotion.haskell"
2039
},
2040
"3":{
2041
"name":"punctuation.bracket.haskell"
2042
}
2043
},
2044
"end":"]",
2045
"endCaptures":{
2046
"0":{
2047
"name":"punctuation.bracket.haskell"
2048
}
2049
},
2050
"name":"meta.type-application.haskell",
2051
"patterns":[
2052
{
2053
"include":"#type_signature"
2054
}
2055
]
2056
},
2057
{
2058
"begin":"(?<=[]\",;\\[{}\\s])(@)(?=\")",
2059
"beginCaptures":{
2060
"1":{
2061
"name":"keyword.operator.prefix.at.haskell"
2062
}
2063
},
2064
"end":"(?<=\")",
2065
"name":"meta.type-application.haskell",
2066
"patterns":[
2067
{
2068
"include":"#string_literal"
2069
}
2070
]
2071
},
2072
{
2073
"begin":"(?<=[]\",;\\[{}\\s])(@)(?=['_\\p{Ll}\\p{Lu}\\p{Lt}\\d])",
2074
"beginCaptures":{
2075
"1":{
2076
"name":"keyword.operator.prefix.at.haskell"
2077
}
2078
},
2079
"end":"(?!['_\\p{Ll}\\p{Lu}\\p{Lt}\\d])",
2080
"name":"meta.type-application.haskell",
2081
"patterns":[
2082
{
2083
"include":"#type_signature"
2084
}
2085
]
2086
}
2087
]
2088
},
2089
"type_constructor":{
2090
"patterns":[
2091
{
2092
"captures":{
2093
"1":{
2094
"name":"keyword.operator.promotion.haskell"
2095
},
2096
"2":{
2097
"name":"entity.name.namespace.haskell"
2098
},
2099
"3":{
2100
"name":"storage.type.haskell"
2101
}
2102
},
2103
"match":"(')?((?:\\b[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*\\.)*)\\b([\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)"
2104
},
2105
{
2106
"captures":{
2107
"1":{
2108
"name":"keyword.operator.promotion.haskell"
2109
},
2110
"2":{
2111
"name":"punctuation.paren.haskell"
2112
},
2113
"3":{
2114
"name":"entity.name.namespace.haskell"
2115
},
2116
"4":{
2117
"name":"storage.type.operator.haskell"
2118
},
2119
"5":{
2120
"name":"punctuation.paren.haskell"
2121
}
2122
},
2123
"match":"(')?(\\()\\s*((?:[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*\\.)*)([[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+)\\s*(\\))"
2124
}
2125
]
2126
},
2127
"type_operator":{
2128
"patterns":[
2129
{
2130
"captures":{
2131
"1":{
2132
"name":"keyword.operator.promotion.haskell"
2133
},
2134
"2":{
2135
"name":"entity.name.namespace.haskell"
2136
},
2137
"3":{
2138
"name":"storage.type.operator.infix.haskell"
2139
}
2140
},
2141
"match":"(?:(?<!')('))?((?:\\b[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*\\.)*)(?![#@]?-})(#+|[[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]+(?<!#))"
2142
},
2143
{
2144
"captures":{
2145
"1":{
2146
"name":"keyword.operator.promotion.haskell"
2147
},
2148
"2":{
2149
"name":"punctuation.backtick.haskell"
2150
},
2151
"3":{
2152
"name":"entity.name.namespace.haskell"
2153
},
2154
"4":{
2155
"name":"storage.type.infix.haskell"
2156
},
2157
"5":{
2158
"name":"punctuation.backtick.haskell"
2159
}
2160
},
2161
"match":"(')?(`)((?:[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*\\.)*)([\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)(`)"
2162
}
2163
]
2164
},
2165
"type_signature":{
2166
"patterns":[
2167
{
2168
"include":"#comment_like"
2169
},
2170
{
2171
"captures":{
2172
"1":{
2173
"name":"keyword.operator.promotion.haskell"
2174
},
2175
"2":{
2176
"name":"punctuation.paren.haskell"
2177
},
2178
"3":{
2179
"name":"punctuation.paren.haskell"
2180
}
2181
},
2182
"match":"(')?(\\()\\s*(\\))",
2183
"name":"support.constant.unit.haskell"
2184
},
2185
{
2186
"captures":{
2187
"1":{
2188
"name":"punctuation.paren.haskell"
2189
},
2190
"2":{
2191
"name":"keyword.operator.hash.haskell"
2192
},
2193
"3":{
2194
"name":"keyword.operator.hash.haskell"
2195
},
2196
"4":{
2197
"name":"punctuation.paren.haskell"
2198
}
2199
},
2200
"match":"(\\()(#)\\s*(#)(\\))",
2201
"name":"support.constant.unit.unboxed.haskell"
2202
},
2203
{
2204
"captures":{
2205
"1":{
2206
"name":"keyword.operator.promotion.haskell"
2207
},
2208
"2":{
2209
"name":"punctuation.paren.haskell"
2210
},
2211
"3":{
2212
"name":"punctuation.paren.haskell"
2213
}
2214
},
2215
"match":"(')?(\\()\\s*,[,\\s]*(\\))",
2216
"name":"support.constant.tuple.haskell"
2217
},
2218
{
2219
"captures":{
2220
"1":{
2221
"name":"punctuation.paren.haskell"
2222
},
2223
"2":{
2224
"name":"keyword.operator.hash.haskell"
2225
},
2226
"3":{
2227
"name":"keyword.operator.hash.haskell"
2228
},
2229
"4":{
2230
"name":"punctuation.paren.haskell"
2231
}
2232
},
2233
"match":"(\\()(#)\\s*(#)(\\))",
2234
"name":"support.constant.unit.unboxed.haskell"
2235
},
2236
{
2237
"captures":{
2238
"1":{
2239
"name":"punctuation.paren.haskell"
2240
},
2241
"2":{
2242
"name":"keyword.operator.hash.haskell"
2243
},
2244
"3":{
2245
"name":"keyword.operator.hash.haskell"
2246
},
2247
"4":{
2248
"name":"punctuation.paren.haskell"
2249
}
2250
},
2251
"match":"(\\()(#)\\s*,[,\\s]*(#)(\\))",
2252
"name":"support.constant.tuple.unboxed.haskell"
2253
},
2254
{
2255
"captures":{
2256
"1":{
2257
"name":"keyword.operator.promotion.haskell"
2258
},
2259
"2":{
2260
"name":"punctuation.bracket.haskell"
2261
},
2262
"3":{
2263
"name":"punctuation.bracket.haskell"
2264
}
2265
},
2266
"match":"(')?(\\[)\\s*(])",
2267
"name":"support.constant.empty-list.haskell"
2268
},
2269
{
2270
"include":"#integer_literals"
2271
},
2272
{
2273
"match":"(::|∷)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])",
2274
"name":"keyword.operator.double-colon.haskell"
2275
},
2276
{
2277
"include":"#forall"
2278
},
2279
{
2280
"match":"=>|⇒",
2281
"name":"keyword.operator.big-arrow.haskell"
2282
},
2283
{
2284
"include":"#string_literal"
2285
},
2286
{
2287
"match":"'[^']'",
2288
"name":"invalid"
2289
},
2290
{
2291
"include":"#type_application"
2292
},
2293
{
2294
"include":"#reserved_symbol"
2295
},
2296
{
2297
"include":"#type_operator"
2298
},
2299
{
2300
"include":"#type_constructor"
2301
},
2302
{
2303
"begin":"(\\()(#)",
2304
"beginCaptures":{
2305
"1":{
2306
"name":"punctuation.paren.haskell"
2307
},
2308
"2":{
2309
"name":"keyword.operator.hash.haskell"
2310
}
2311
},
2312
"end":"(#)(\\))",
2313
"endCaptures":{
2314
"1":{
2315
"name":"keyword.operator.hash.haskell"
2316
},
2317
"2":{
2318
"name":"punctuation.paren.haskell"
2319
}
2320
},
2321
"patterns":[
2322
{
2323
"include":"#comma"
2324
},
2325
{
2326
"include":"#type_signature"
2327
}
2328
]
2329
},
2330
{
2331
"begin":"(')?(\\()",
2332
"beginCaptures":{
2333
"1":{
2334
"name":"keyword.operator.promotion.haskell"
2335
},
2336
"2":{
2337
"name":"punctuation.paren.haskell"
2338
}
2339
},
2340
"end":"(\\))",
2341
"endCaptures":{
2342
"1":{
2343
"name":"punctuation.paren.haskell"
2344
}
2345
},
2346
"patterns":[
2347
{
2348
"include":"#comma"
2349
},
2350
{
2351
"include":"#type_signature"
2352
}
2353
]
2354
},
2355
{
2356
"begin":"(')?(\\[)",
2357
"beginCaptures":{
2358
"1":{
2359
"name":"keyword.operator.promotion.haskell"
2360
},
2361
"2":{
2362
"name":"punctuation.bracket.haskell"
2363
}
2364
},
2365
"end":"(])",
2366
"endCaptures":{
2367
"1":{
2368
"name":"punctuation.bracket.haskell"
2369
}
2370
},
2371
"patterns":[
2372
{
2373
"include":"#comma"
2374
},
2375
{
2376
"include":"#type_signature"
2377
}
2378
]
2379
},
2380
{
2381
"include":"#type_variable"
2382
}
2383
]
2384
},
2385
"type_variable":{
2386
"match":"\\b(?<!')(?!(?:forall|deriving)\\b(?!'))[_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*",
2387
"name":"variable.other.generic-type.haskell"
2388
},
2389
"where":{
2390
"patterns":[
2391
{
2392
"begin":"(?<!')\\b(where)\\s*(\\{)(?!-)",
2393
"beginCaptures":{
2394
"1":{
2395
"name":"keyword.other.where.haskell"
2396
},
2397
"2":{
2398
"name":"punctuation.brace.haskell"
2399
}
2400
},
2401
"end":"(})",
2402
"endCaptures":{
2403
"1":{
2404
"name":"punctuation.brace.haskell"
2405
}
2406
},
2407
"patterns":[
2408
{
2409
"include":"$self"
2410
},
2411
{
2412
"match":";",
2413
"name":"punctuation.semicolon.haskell"
2414
}
2415
]
2416
},
2417
{
2418
"match":"\\b(?<!')(where)\\b(?!')",
2419
"name":"keyword.other.where.haskell"
2420
}
2421
]
2422
}
2423
},
2424
"scopeName":"source.haskell"
2425
}
2426