-----------------------------------------------------------------------------
--- $Id: DriverPhases.hs,v 1.1 2000/10/16 15:16:59 simonmar Exp $
+-- $Id: DriverPhases.hs,v 1.2 2000/11/13 14:34:37 sewardj Exp $
--
-- GHC Driver
--
-- by its suffix.
startPhase "lhs" = Unlit
startPhase "hs" = Cpp
+startPhase "hspp" = Hsc -- not sure this will work ...
startPhase "hc" = HCc
startPhase "c" = Cc
startPhase "raw_s" = Mangle
startPhase "s" = As
startPhase "S" = As
-startPhase "o" = Ln
+startPhase "o" = Ln
startPhase _ = Ln -- all unknown file types
-- the output suffix for a given phase is uniquely determined by
-- the input requirements of the next phase.
phaseInputExt Unlit = "lhs"
phaseInputExt Cpp = "lpp" -- intermediate only
-phaseInputExt Hsc = "cpp" -- intermediate only
+phaseInputExt Hsc = "hspp" -- intermediate only
phaseInputExt HCc = "hc"
phaseInputExt Cc = "c"
phaseInputExt Mangle = "raw_s"
-----------------------------------------------------------------------------
--- $Id: DriverPipeline.hs,v 1.19 2000/11/13 12:43:20 sewardj Exp $
+-- $Id: DriverPipeline.hs,v 1.20 2000/11/13 14:34:37 sewardj Exp $
--
-- GHC Driver
--
return ofile
else do -- carry on ...
- -- sadly, ghc -E is supposed to write the file to stdout. We
- -- generate <file>.cpp, so we also have to cat the file here.
- when (null phases && phase == Cpp) $
- run_something "Dump pre-processed file to stdout"
- ("cat " ++ output_fn)
-
pipeLoop phases output_fn do_linking use_ofile orig_basename orig_suffix
where