[project @ 2000-11-13 14:34:37 by sewardj]
authorsewardj <unknown>
Mon, 13 Nov 2000 14:34:37 +0000 (14:34 +0000)
committersewardj <unknown>
Mon, 13 Nov 2000 14:34:37 +0000 (14:34 +0000)
-E now puts results in a <file>.hspp, doesn't dump to stdout.

ghc/compiler/main/DriverPhases.hs
ghc/compiler/main/DriverPipeline.hs

index 6bf8ad2..b6c213c 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $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
 --
@@ -53,19 +53,20 @@ data Phase
 -- 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"
index 8995e13..3e42f13 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $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
 --
@@ -267,12 +267,6 @@ pipeLoop ((phase, keep, o_suffix):phases)
                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