import System.Directory
import System.FilePath
import System.IO
-import SYSTEM_IO_ERROR as IO
+import System.IO.Error as IO
import Control.Monad
import Data.List ( isSuffixOf )
import Data.Maybe
extCoreName = basename ++ ".hcr" }
let hsc_env' = hsc_env { hsc_dflags = dflags' }
- -- -no-recomp should also work with --make
+ -- -fforce-recomp should also work with --make
let force_recomp = dopt Opt_ForceRecomp dflags
source_unchanged = isJust maybe_old_linkable && not force_recomp
object_filename = ml_obj_file location
-- if the modification time on the executable is later than the
-- modification times on all of the objects, then omit linking
- -- (unless the -no-recomp flag was given).
+ -- (unless the -fforce-recomp flag was given).
e_exe_time <- IO.try $ getModificationTime exe_file
extra_ld_inputs <- readIORef v_Ld_inputs
extra_times <- mapM (IO.try . getModificationTime) extra_ld_inputs
]
-----------------------------------------------------------------------------
--- Complain about non-dynamic flags in OPTIONS pragmas
-
-checkProcessArgsResult :: [String] -> FilePath -> IO ()
-checkProcessArgsResult flags filename
- = do when (notNull flags) (throwDyn (ProgramError (
- showSDoc (hang (text filename <> char ':')
- 4 (text "unknown flags in {-# OPTIONS #-} pragma:" <+>
- hsep (map text flags)))
- )))
-
------------------------------------------------------------------------------
-- Look for the /* GHC_PACKAGES ... */ comment at the top of a .hc file
getHCFilePackages :: FilePath -> IO [PackageId]