[project @ 2001-09-04 18:29:20 by ken]
[ghc-hetmet.git] / ghc / compiler / main / DriverPipeline.hs
index 68c57e4..4ab9f55 100644 (file)
@@ -266,7 +266,7 @@ runPipeline pipeline (input_fn,suffix) do_linking use_ofile
   where (basename, _) = splitFilename input_fn
 
 pipeLoop [] input_fn _ _ _ _ = return input_fn
-pipeLoop ((phase, keep, o_suffix):phases) 
+pipeLoop (all_phases@((phase, keep, o_suffix):phases))
        (input_fn,real_suff) do_linking use_ofile orig_basename orig_suffix
   = do
 
@@ -277,7 +277,7 @@ pipeLoop ((phase, keep, o_suffix):phases)
        -- checker has determined that recompilation isn't necessary.
      case mbCarryOn of
        Nothing -> do
-             let (_,keep,final_suffix) = last phases
+             let (_,keep,final_suffix) = last all_phases
              ofile <- outputFileName True keep final_suffix
              return (ofile, final_suffix)
           -- carry on ...
@@ -868,8 +868,8 @@ doLink o_files = do
                      ++ pkg_extra_ld_opts
                      ++ extra_ld_opts
                      ++ if static && not no_hs_main then
-                           [ "-u", prefixUnderscore "PrelMain_mainIO_closure" ,
-                             "-u", prefixUnderscore "__init_PrelMain"] 
+                           [ "-u", prefixUnderscore "PrelMain_mainIO_closure",
+                             "-u", prefixUnderscore "__stginit_PrelMain"] 
                         else []))
 
     -- parallel only: move binary to another dir -- HWL
@@ -1054,7 +1054,7 @@ compile ghci_mode summary source_unchanged have_object
 
    -- -no-recomp should also work with --make
    do_recomp <- readIORef v_Recomp
-   let source_unchanged' = source_unchanged && not do_recomp
+   let source_unchanged' = source_unchanged && do_recomp
 
    -- run the compiler
    hsc_result <- hscMain ghci_mode dyn_flags'