on master help sign in
bump tree-sitter-haskell and update queries (#8558)
commit814cf177d470e9890e5d62ecf46ff2f9cf3ed75a authorRyan Mehri <52933714+rmehri01@users.noreply.github.com> dateTue 17 Oct 2023, 03:19 (3 years ago) parentcd59164
2 files changed+25−12
languages.toml+1−1 runtime/queries/haskell/highlights.scm+24−11
languages.toml+1−1
@@ -1094,7 +1094,7 @@ indent = { tab-width = 2, unit = " " }
10941094
10951095[[grammar]]
10961096name = "haskell"
1097−source = { git = "https://github.com/tree-sitter/tree-sitter-haskell", rev = "98fc7f59049aeb713ab9b72a8ff25dcaaef81087" }
1097+source = { git = "https://github.com/tree-sitter/tree-sitter-haskell", rev = "d7ac98f49e3ed7e17541256fe3881a967d7ffdd3" }
10981098
10991099[[language]]
11001100name = "haskell-persistent"
runtime/queries/haskell/highlights.scm+24−11
@@ -33,6 +33,11 @@
3333;; ----------------------------------------------------------------------------
3434;; Keywords, operators, includes
3535
36+[
37+ "forall"
38+ "∀"
39+] @keyword.control.repeat
40+
3641(pragma) @constant.macro
3742
3843[
@@ -68,10 +73,7 @@
6873 "@"
6974] @operator
7075
71−(qualified_module (module) @constructor)
72−(qualified_type (module) @namespace)
73−(qualified_variable (module) @namespace)
74−(import (module) @namespace)
76+(module) @namespace
7577
7678[
7779 (where)
@@ -92,8 +94,6 @@
9294 "do"
9395 "mdo"
9496 "rec"
95− "forall"
96− "∀"
9797 "infix"
9898 "infixl"
9999 "infixr"
@@ -104,22 +104,35 @@
104104;; Functions and variables
105105
106106(signature name: (variable) @type)
107−(function name: (variable) @function)
108−
109−(variable) @variable
110−"_" @variable.builtin
107+(function
108+ name: (variable) @function
109+ patterns: (patterns))
110+((signature (fun)) . (function (variable) @function))
111+((signature (context (fun))) . (function (variable) @function))
112+((signature (forall (context (fun)))) . (function (variable) @function))
111113
112114(exp_infix (variable) @operator) ; consider infix functions as operators
113115
114−("@" @namespace) ; "as" pattern operator, e.g. x@Constructor
116+(exp_infix (exp_name) @function)
117+(exp_apply . (exp_name (variable) @function))
118+(exp_apply . (exp_name (qualified_variable (variable) @function)))
115119
120+(variable) @variable
121+(pat_wildcard) @variable
116122
117123;; ----------------------------------------------------------------------------
118124;; Types
119125
120126(type) @type
127+(type_variable) @type
121128
122129(constructor) @constructor
123130
124131; True or False
125132((constructor) @_bool (#match? @_bool "(True|False)")) @constant.builtin.boolean
133+
134+;; ----------------------------------------------------------------------------
135+;; Quasi-quotes
136+
137+(quoter) @function
138+; Highlighting of quasiquote_body is handled by injections.scm