diff options
-rw-r--r-- | compiler/GHC/Unit/Module/Graph.hs | 21 | ||||
-rw-r--r-- | testsuite/tests/driver/T20300/S.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/driver/T20300/T.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/driver/T20300/T.hs-boot | 1 | ||||
-rw-r--r-- | testsuite/tests/driver/T20300/T20300.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/driver/T20300/Top.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/driver/T20300/all.T | 6 |
7 files changed, 30 insertions, 11 deletions
diff --git a/compiler/GHC/Unit/Module/Graph.hs b/compiler/GHC/Unit/Module/Graph.hs index bf7abfea99..822f72b88b 100644 --- a/compiler/GHC/Unit/Module/Graph.hs +++ b/compiler/GHC/Unit/Module/Graph.hs @@ -193,20 +193,19 @@ showModMsg dflags recomp (ModuleNode (ExtendedModSummary mod_summary _)) = [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ') , char '(' , text (op $ msHsFilePath mod_summary) <> char ',' - ] ++ - if gopt Opt_BuildDynamicToo dflags - then [ text obj_file <> char ',' - , text dyn_file - , char ')' - ] - else [ text obj_file, char ')' ] + , message, char ')' ] + where op = normalise mod = moduleName (ms_mod mod_summary) mod_str = showPpr dflags mod ++ hscSourceString (ms_hsc_src mod_summary) dyn_file = op $ msDynObjFilePath mod_summary - obj_file = case backend dflags of - Interpreter | recomp -> "interpreted" - NoBackend -> "nothing" - _ -> (op $ msObjFilePath mod_summary) + obj_file = op $ msObjFilePath mod_summary + message = case backend dflags of + Interpreter | recomp -> text "interpreted" + NoBackend -> text "nothing" + _ -> + if gopt Opt_BuildDynamicToo dflags + then text obj_file <> comma <+> text dyn_file + else text obj_file diff --git a/testsuite/tests/driver/T20300/S.hs b/testsuite/tests/driver/T20300/S.hs new file mode 100644 index 0000000000..d1661a904e --- /dev/null +++ b/testsuite/tests/driver/T20300/S.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TemplateHaskell #-} +module S where + +import {-# SOURCE #-} T diff --git a/testsuite/tests/driver/T20300/T.hs b/testsuite/tests/driver/T20300/T.hs new file mode 100644 index 0000000000..326dbea428 --- /dev/null +++ b/testsuite/tests/driver/T20300/T.hs @@ -0,0 +1 @@ +module T where diff --git a/testsuite/tests/driver/T20300/T.hs-boot b/testsuite/tests/driver/T20300/T.hs-boot new file mode 100644 index 0000000000..326dbea428 --- /dev/null +++ b/testsuite/tests/driver/T20300/T.hs-boot @@ -0,0 +1 @@ +module T where diff --git a/testsuite/tests/driver/T20300/T20300.stderr b/testsuite/tests/driver/T20300/T20300.stderr new file mode 100644 index 0000000000..1a93d8d7ba --- /dev/null +++ b/testsuite/tests/driver/T20300/T20300.stderr @@ -0,0 +1,4 @@ +[1 of 4] Compiling T[boot] ( T.hs-boot, nothing ) +[2 of 4] Compiling S ( S.hs, S.o, S.dyn_o ) +[3 of 4] Compiling T ( T.hs, T.o, T.dyn_o ) +[4 of 4] Compiling Top ( Top.hs, nothing ) diff --git a/testsuite/tests/driver/T20300/Top.hs b/testsuite/tests/driver/T20300/Top.hs new file mode 100644 index 0000000000..72116b0bf6 --- /dev/null +++ b/testsuite/tests/driver/T20300/Top.hs @@ -0,0 +1,4 @@ +module Top where + +import S +import T diff --git a/testsuite/tests/driver/T20300/all.T b/testsuite/tests/driver/T20300/all.T new file mode 100644 index 0000000000..96b592ae9a --- /dev/null +++ b/testsuite/tests/driver/T20300/all.T @@ -0,0 +1,6 @@ +test('T20300' + , [ unless(have_dynamic(), skip) + , extra_files(['S.hs', 'T.hs', 'T.hs-boot', 'Top.hs']) ] + , multimod_compile, ['Top','-fno-code -fwrite-interface']) + + |