aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights
diff options
context:
space:
mode:
authorMarc Jakobi <marc.jakobi@tiko.energy>2024-05-07 09:27:44 +0200
committerGitHub <noreply@github.com>2024-05-07 07:27:44 +0000
commitda0efd7398713a3177da5ce8690f0e5c5415763d (patch)
tree9f21bbf789153bd283f6d52c118e44e9cdaf3f6f /tests/query/highlights
parentbot(lockfile): update bash, json, lalrpop, phpdoc, qmljs, query, tsx, typescript (diff)
downloadnvim-treesitter-da0efd7398713a3177da5ce8690f0e5c5415763d.tar
nvim-treesitter-da0efd7398713a3177da5ce8690f0e5c5415763d.tar.gz
nvim-treesitter-da0efd7398713a3177da5ce8690f0e5c5415763d.tar.bz2
nvim-treesitter-da0efd7398713a3177da5ce8690f0e5c5415763d.tar.lz
nvim-treesitter-da0efd7398713a3177da5ce8690f0e5c5415763d.tar.xz
nvim-treesitter-da0efd7398713a3177da5ce8690f0e5c5415763d.tar.zst
nvim-treesitter-da0efd7398713a3177da5ce8690f0e5c5415763d.zip
fix(haskell): update queries and tests for rewritten parser (#6580)
Diffstat (limited to 'tests/query/highlights')
-rw-r--r--tests/query/highlights/haskell/test.hs29
1 files changed, 20 insertions, 9 deletions
diff --git a/tests/query/highlights/haskell/test.hs b/tests/query/highlights/haskell/test.hs
index 7734a448b..f719981ff 100644
--- a/tests/query/highlights/haskell/test.hs
+++ b/tests/query/highlights/haskell/test.hs
@@ -1,10 +1,13 @@
{-# LANGUAGE QuasiQuotes #-}
-- ^ @keyword.directive
+{-| Main module -}
+ -- ^ @comment.documentation
module Main
-- ^ @keyword.import
-- ^ @module
( main
+ -- ^ @variable
) where
-- ^ @keyword
@@ -16,12 +19,12 @@ import Prelude hiding (show)
import Data.Map (fromList)
-- ^ @module
import qualified Data.Map as Map
- -- ^ @constructor
+ -- ^ @module
-- ^ @module
import qualified Chronos
-- ^ @module
import qualified Chronos as C
- -- ^ @constructor
+ -- ^ @module
-- ^ @module
import FooMod (BarTy (barField))
-- ^ @variable.member
@@ -47,9 +50,9 @@ mkAQualified x = SomeModule.A x
class Ord a => PartialOrd a
-- ^ @type
- -- ^ @type
+ -- ^ @variable
-- ^ @type
- -- ^ @type
+ -- ^ @variable
instance Ord ADT where
-- ^ @type
@@ -78,7 +81,7 @@ main :: IO ()
-- ^ @function
-- ^ @operator
-- ^ @type
- -- ^ @string.special.symbol
+ -- ^ @type
main = undefined
-- ^ @function
-- ^ @keyword.exception
@@ -95,14 +98,20 @@ someFunc0 x = someFunc1 x
-- ^ @number
scopedTypeParam (x :: Int) = someFunc x
-- ^ @variable.parameter
+ -- ^ @type
scopedTypeParam (Just x :: Int) = someFunc x
+ -- ^ @constructor
-- ^ @variable.parameter
+ -- ^ @type
+scopedTypeParam (f :: Int -> Int) = someFunc x
+ -- ^ @function
someInfix :: Integral a => a -> Double
-- ^ @type
- -- ^ @type
+ -- ^ @variable
-- ^ @operator
- -- ^ @type
+ -- ^ @variable
+ -- ^ @type
someInfix x = fromIntegral x `myAdd` floatVal
-- ^ @function.call
-- ^ @variable
@@ -149,8 +158,10 @@ someInfix x = fromIntegral x `myAdd` floatVal
someIOaction :: IO ()
-- ^ @function
-someIOaction = do
- -- ^ @keyword
+anotherIOaction :: IO ()
+anotherIOaction = do
+-- ^ @function
+ -- ^ @keyword
foo <- SomeModule.someFun <$> getArgs
-- ^ @variable
-- ^ @module