-compileFiles mode dflags srcs = do
- stop_flag <- readIORef v_GhcModeFlag
- mapM (compileFile mode dflags stop_flag) srcs
-
-
-compileFile mode dflags stop_flag src = do
- exists <- doesFileExist src
- when (not exists) $
- throwDyn (CmdLineError ("file `" ++ src ++ "' does not exist"))
-
- o_file <- readIORef v_Output_file
- -- when linking, the -o argument refers to the linker's output.
- -- otherwise, we use it as the name for the pipeline's output.
- let maybe_o_file
- | mode==DoLink || mode==DoMkDLL = Nothing
- | otherwise = o_file
-
- runPipeline mode dflags stop_flag True maybe_o_file src
- Nothing{-no ModLocation-}