From 4aa3c5bde8c54f6ab8cbb2a574f7654590c077ca Mon Sep 17 00:00:00 2001 From: Norman Ramsey Date: Mon, 7 Feb 2022 10:42:36 -0500 Subject: Change `Backend` type and remove direct dependencies With this change, `Backend` becomes an abstract type (there are no more exposed value constructors). Decisions that were formerly made by asking "is the current back end equal to (or different from) this named value constructor?" are now made by interrogating the back end about its properties, which are functions exported by `GHC.Driver.Backend`. There is a description of how to migrate code using `Backend` in the user guide. Clients using the GHC API can find a backdoor to access the Backend datatype in GHC.Driver.Backend.Internal. Bumps haddock submodule. Fixes #20927 --- compiler/GHC/Unit/Module/Graph.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/GHC/Unit') diff --git a/compiler/GHC/Unit/Module/Graph.hs b/compiler/GHC/Unit/Module/Graph.hs index 06f3fcdc68..c09d778086 100644 --- a/compiler/GHC/Unit/Module/Graph.hs +++ b/compiler/GHC/Unit/Module/Graph.hs @@ -271,10 +271,9 @@ showModMsg dflags recomp (ModuleNode _ mod_summary) = mod_str = showPpr dflags mod ++ hscSourceString (ms_hsc_src mod_summary) dyn_file = op $ msDynObjFilePath mod_summary obj_file = op $ msObjFilePath mod_summary - message = case backend dflags of - Interpreter | recomp -> text "interpreted" - NoBackend -> text "nothing" - _ -> + message = case backendSpecialModuleSource (backend dflags) recomp of + Just special -> text special + Nothing -> if gopt Opt_BuildDynamicToo dflags then text obj_file <> comma <+> text dyn_file else text obj_file -- cgit v1.2.1