summaryrefslogtreecommitdiff
path: root/testsuite/tests/hiefile
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-02-04 22:38:57 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-26 19:00:07 -0400
commit872a9444df4d38cd5dc0fbb7a249d89596e73ea2 (patch)
tree01a1ba920dfc7c5470bc2743e3bbc92413e4dd97 /testsuite/tests/hiefile
parentd930fecb6d241c1eb13c30cf1126132766ff602e (diff)
downloadhaskell-872a9444df4d38cd5dc0fbb7a249d89596e73ea2.tar.gz
Refactor NameCache
* Make NameCache the mutable one and replace NameCacheUpdater with it * Remove NameCache related code duplicated into haddock Bump haddock submodule
Diffstat (limited to 'testsuite/tests/hiefile')
-rw-r--r--testsuite/tests/hiefile/should_run/HieQueries.hs4
-rw-r--r--testsuite/tests/hiefile/should_run/PatTypes.hs4
2 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/tests/hiefile/should_run/HieQueries.hs b/testsuite/tests/hiefile/should_run/HieQueries.hs
index 2446be5963..68f6516d0e 100644
--- a/testsuite/tests/hiefile/should_run/HieQueries.hs
+++ b/testsuite/tests/hiefile/should_run/HieQueries.hs
@@ -44,7 +44,7 @@ data A = A deriving Show
makeNc :: IO NameCache
makeNc = do
uniq_supply <- mkSplitUniqSupply 'z'
- return $ initNameCache uniq_supply []
+ initNameCache uniq_supply []
dynFlagsForPrinting :: String -> IO DynFlags
dynFlagsForPrinting libdir = do
@@ -55,7 +55,7 @@ main = do
libdir:_ <- getArgs
df <- dynFlagsForPrinting libdir
nc <- makeNc
- hfr <- readHieFile (NCU (\f -> pure $ snd $ f nc)) "HieQueries.hie"
+ hfr <- readHieFile nc "HieQueries.hie"
let hf = hie_file_result hfr
refmap = generateReferencesMap $ getAsts $ hie_asts hf
explainEv df hf refmap point
diff --git a/testsuite/tests/hiefile/should_run/PatTypes.hs b/testsuite/tests/hiefile/should_run/PatTypes.hs
index 39b9b59f78..0f5f733066 100644
--- a/testsuite/tests/hiefile/should_run/PatTypes.hs
+++ b/testsuite/tests/hiefile/should_run/PatTypes.hs
@@ -35,7 +35,7 @@ p4 = (26,5)
makeNc :: IO NameCache
makeNc = do
uniq_supply <- mkSplitUniqSupply 'z'
- return $ initNameCache uniq_supply []
+ initNameCache uniq_supply []
dynFlagsForPrinting :: String -> IO DynFlags
dynFlagsForPrinting libdir = do
@@ -50,7 +50,7 @@ main = do
libdir:_ <- getArgs
df <- dynFlagsForPrinting libdir
nc <- makeNc
- hfr <- readHieFile (NCU (\f -> pure $ snd $ f nc)) "PatTypes.hie"
+ hfr <- readHieFile nc "PatTypes.hie"
let hf = hie_file_result hfr
forM_ [p1,p2,p3,p4] $ \point -> do
putStr $ "At " ++ show point ++ ", got type: "