fix(haskell): update queries and tests for rewritten parser (#6580)

This commit is contained in:
Marc Jakobi 2024-05-07 09:27:44 +02:00 committed by GitHub
parent 0319e6eef5
commit da0efd7398
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 238 additions and 373 deletions

View file

@ -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

View file

@ -4,6 +4,7 @@ local ts = vim.treesitter
local COMMENT_NODES = {
markdown = "html_block",
haskell = "haddock",
}
local function check_assertions(file)