Skip to content
Snippets Groups Projects
Commit 257bb3bd authored by Vasily Sterekhov's avatar Vasily Sterekhov Committed by Marge Bot
Browse files

Add test for #23120

parent 6bbde581
No related branches found
No related tags found
No related merge requests found
{-# LANGUAGE GHC2021 #-}
module Main where
import TestUtils
import qualified Data.Map.Strict as Map
import Data.Either
import Data.Maybe
import GHC.Plugins (nameOccName, occNameString)
f :: Int -> Int -> Bool
f x = (x ==)
-- ^ point
point :: (Int,Int)
point = (12,10)
main = do
(df, hf) <- readTestHie "T23120.hie"
let ast = fromMaybe (error "nothing") $ selectPoint hf point
idents = sourcedNodeIdents $ sourcedNodeInfo ast
names = rights $ Map.keys idents
mapM_ (print . occNameString . nameOccName) names
"=="
"$dEq"
......@@ -6,3 +6,4 @@ test('RecordDotTypes', [extra_run_opts('"' + config.libdir + '"'), extra_files([
test('SpliceTypes', [req_th, extra_run_opts('"' + config.libdir + '"'), extra_files(['TestUtils.hs'])], compile_and_run, ['-package ghc -fwrite-ide-info'])
test('HieVdq', [extra_run_opts('"' + config.libdir + '"'), extra_files(['TestUtils.hs'])], compile_and_run, ['-package ghc -fwrite-ide-info'])
test('T23540', [extra_run_opts('"' + config.libdir + '"'), extra_files(['TestUtils.hs'])], compile_and_run, ['-package ghc -fwrite-ide-info'])
test('T23120', [extra_run_opts('"' + config.libdir + '"'), extra_files(['TestUtils.hs'])], compile_and_run, ['-package ghc -fwrite-ide-info'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment