[project @ 2001-02-20 09:41:48 by simonpj]
[ghc-hetmet.git] / ghc / compiler / main / DriverPhases.hs
index 6bf8ad2..80c2b44 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.4 2001/01/03 11:13:43 simonmar Exp $
 --
 -- GHC Driver
 --
@@ -47,25 +47,26 @@ data Phase
        | SplitAs
        | As
        | Ln 
-  deriving (Eq)
+  deriving (Eq, Show)
 
 -- the first compilation phase for a given file is determined
 -- by its suffix.
 startPhase "lhs"   = Unlit
 startPhase "hs"    = Cpp
+startPhase "hspp"  = Hsc
 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"
 phaseInputExt HCc         = "hc"
 phaseInputExt Cc          = "c"
 phaseInputExt Mangle      = "raw_s"
@@ -75,7 +76,7 @@ phaseInputExt SplitAs     = "split_s"   -- not really generated
 phaseInputExt Ln          = "o"
 phaseInputExt MkDependHS  = "dep"
 
-haskellish_suffix = (`elem` [ "hs", "lhs", "hc" ])
+haskellish_suffix = (`elem` [ "hs", "hspp", "lhs", "hc" ])
 cish_suffix       = (`elem` [ "c", "s", "S" ])  -- maybe .cc et al.??
 
 haskellish_file f = haskellish_suffix suf where (_,suf) = splitFilename f