[Git][ghc/ghc][wip/interface-loading-errs] Convert interface file loading errors into proper diagnostics

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Mon Mar 27 11:47:41 UTC 2023



Matthew Pickering pushed to branch wip/interface-loading-errs at Glasgow Haskell Compiler / GHC


Commits:
a62f7ac3 by Matthew Pickering at 2023-03-27T12:47:25+01:00
Convert interface file loading errors into proper diagnostics

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.

- - - - -


30 changed files:

- compiler/GHC/Driver/Config/Diagnostic.hs
- compiler/GHC/Driver/Config/Tidy.hs
- compiler/GHC/Driver/Errors.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Errors/Types.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/MakeFile.hs
- compiler/GHC/Iface/Errors.hs
- + compiler/GHC/Iface/Errors/Ppr.hs
- + compiler/GHC/Iface/Errors/Types.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Runtime/Loader.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Types/Error.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Utils/Error.hs
- compiler/ghc.cabal.in
- ghc/Main.hs
- testsuite/tests/cabal/cabal05/cabal05.stderr
- testsuite/tests/cabal/ghcpkg04.stderr
- testsuite/tests/count-deps/CountDepsAst.stdout
- testsuite/tests/count-deps/CountDepsParser.stdout


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a62f7ac33d7bbe965b13bb23e29324a164151b2b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a62f7ac33d7bbe965b13bb23e29324a164151b2b
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230327/a3c15983/attachment.html>


More information about the ghc-commits mailing list