From ec6ae2beb90fe1f475531de3a3210ca5da50d6ad Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 24 May 2005 14:18:34 +0000 Subject: [PATCH] [project @ 2005-05-24 14:18:34 by simonmar] Don't write the interface in JustTypecheck mode --- ghc/compiler/iface/MkIface.lhs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/iface/MkIface.lhs b/ghc/compiler/iface/MkIface.lhs index f27538d..3d71b89 100644 --- a/ghc/compiler/iface/MkIface.lhs +++ b/ghc/compiler/iface/MkIface.lhs @@ -338,8 +338,9 @@ mkIface hsc_env maybe_old_iface writeIfaceFile :: HscEnv -> ModLocation -> ModIface -> Bool -> IO () -- Write the interface file, if necessary writeIfaceFile hsc_env location new_iface no_change_at_all - | no_change_at_all = return () - | ghc_mode == Interactive = return () + | no_change_at_all = return () + | ghc_mode == Interactive = return () + | ghc_mode == JustTypecheck = return () | otherwise = do { createDirectoryHierarchy (directoryOf hi_file_path) ; writeBinIface hi_file_path new_iface } @@ -783,7 +784,8 @@ check_old_iface mod_summary source_unchanged maybe_iface -- If the source has changed and we're in interactive mode, avoid reading -- an interface; just return the one we might have been supplied with. getGhciMode `thenM` \ ghci_mode -> - if (ghci_mode == Interactive) && not source_unchanged then + if (ghci_mode == Interactive || ghci_mode == JustTypecheck) + && not source_unchanged then returnM (outOfDate, maybe_iface) else -- 1.7.10.4