summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2023-03-14 17:34:30 +0000
committerGHC GitLab CI <ghc-ci@gitlab-haskell.org>2023-04-17 14:57:04 +0100
commitec9b7dd7b80b9637a84e60ce9425bfd223b4c379 (patch)
tree62e79864d016a6e5105e395ee19a2202d4892ce6 /testsuite/tests/ghc-api
parent1532a8b2b222fee73959a0760ac8867be7f19ce6 (diff)
downloadhaskell-wip/interface-loading-errs.tar.gz
Convert interface file loading errors into proper diagnosticswip/interface-loading-errs
This patch converts all the errors to do with loading interface files into proper structured diagnostics. * DriverMessage: Sometimes in the driver we attempt to load an interface file so we embed the IfaceMessage into the DriverMessage. * TcRnMessage: Most the time we are loading interface files during typechecking, so we embed the IfaceMessage This patch also removes the TcRnInterfaceLookupError constructor which is superceded by the IfaceMessage, which is now structured compared to just storing an SDoc before.
Diffstat (limited to 'testsuite/tests/ghc-api')
-rw-r--r--testsuite/tests/ghc-api/T4891/T4891.hs2
-rw-r--r--testsuite/tests/ghc-api/T4891/T4891.stdout10
-rw-r--r--testsuite/tests/ghc-api/target-contents/TargetContents.stderr8
3 files changed, 10 insertions, 10 deletions
diff --git a/testsuite/tests/ghc-api/T4891/T4891.hs b/testsuite/tests/ghc-api/T4891/T4891.hs
index 82981a9e82..c6d35773f7 100644
--- a/testsuite/tests/ghc-api/T4891/T4891.hs
+++ b/testsuite/tests/ghc-api/T4891/T4891.hs
@@ -62,6 +62,6 @@ chaseConstructor !hv = do
Right dcName -> do
putStrLn $ "Name: " ++ showPpr dflags dcName
putStrLn $ "OccString: " ++ "'" ++ getOccString dcName ++ "'"
- dc <- ioLookupDataCon hscEnv dcName
+ dc <- lookupGlobal hscEnv dcName
putStrLn $ "DataCon: " ++ showPpr dflags dc
_ -> return ()
diff --git a/testsuite/tests/ghc-api/T4891/T4891.stdout b/testsuite/tests/ghc-api/T4891/T4891.stdout
index 8ad0b4eabe..758d497e16 100644
--- a/testsuite/tests/ghc-api/T4891/T4891.stdout
+++ b/testsuite/tests/ghc-api/T4891/T4891.stdout
@@ -1,20 +1,20 @@
=====
Name: False
OccString: 'False'
-DataCon: False
+DataCon: Data constructor ‘False’
=====
Name: :
OccString: ':'
-DataCon: :
+DataCon: Data constructor ‘:’
=====
Name: :->
OccString: ':->'
-DataCon: :->
+DataCon: Data constructor ‘:->’
=====
Name: :->.
OccString: ':->.'
-DataCon: :->.
+DataCon: Data constructor ‘:->.’
=====
Name: :->.+
OccString: ':->.+'
-DataCon: :->.+
+DataCon: Data constructor ‘:->.+’
diff --git a/testsuite/tests/ghc-api/target-contents/TargetContents.stderr b/testsuite/tests/ghc-api/target-contents/TargetContents.stderr
index 3fa570ca1d..f1dfb73027 100644
--- a/testsuite/tests/ghc-api/target-contents/TargetContents.stderr
+++ b/testsuite/tests/ghc-api/target-contents/TargetContents.stderr
@@ -16,8 +16,8 @@ B.hs:3:5: error: [GHC-88464] Variable not in scope: z
B.hs:3:5: error: [GHC-88464] Variable not in scope: z
== Dep_Error_MM_A
-A.hs:3:1: error:
- Could not find module ‘B’
+A.hs:3:1: error: [GHC-87110]
+ Could not find module ‘B’.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
== Dep_DM_AB
== Dep_Error_DM_AB
@@ -25,8 +25,8 @@ A.hs:3:1: error:
B.hs:3:5: error: [GHC-88464] Variable not in scope: z
== Dep_Error_DM_A
-A.hs:3:1: error:
- Could not find module ‘B’
+A.hs:3:1: error: [GHC-87110]
+ Could not find module ‘B’.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
== Dep_MD_AB
== Dep_Error_MD_AB