From f9e358d08cb84e06000d23f01edb68a674695a55 Mon Sep 17 00:00:00 2001 From: panne Date: Mon, 3 Jul 2000 21:31:28 +0000 Subject: [PATCH] [project @ 2000-07-03 21:31:28 by panne] Print "Interface file unchanged" and "Module version unchanged, but usages differ; hence need new hi file" only when -ddump-rn-trace flag has been given. This is more consistent with the rest of GHC and the *nix world, and messes up less tests. --- ghc/compiler/main/MkIface.lhs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ghc/compiler/main/MkIface.lhs b/ghc/compiler/main/MkIface.lhs index fbca8ce..354b7da 100644 --- a/ghc/compiler/main/MkIface.lhs +++ b/ghc/compiler/main/MkIface.lhs @@ -68,6 +68,7 @@ import Bag import Outputable import Maybe ( isNothing ) +import Monad ( when ) \end{code} @@ -99,17 +100,16 @@ writeIface this_mod old_iface new_iface in case checkIface old_iface full_new_iface of { - Nothing -> do { putStrLn "Interface file unchanged" ; - return () } ; -- No need to update .hi file + Nothing -> when opt_D_dump_rn_trace $ + putStrLn "Interface file unchanged" ; -- No need to update .hi file Just final_iface -> do let mod_vers_unchanged = case old_iface of Just iface -> pi_vers iface == pi_vers final_iface Nothing -> False - if mod_vers_unchanged - then putStrLn "Module version unchanged, but usages differ; hence need new hi file" - else return () + when (mod_vers_unchanged && opt_D_dump_rn_trace) $ + putStrLn "Module version unchanged, but usages differ; hence need new hi file" if_hdl <- openFile filename WriteMode printForIface if_hdl (pprIface final_iface) -- 1.7.10.4