X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPhases.hs;h=b684d0e80b49c9f2f36e21417dfc6a8b36aa3b49;hb=ad94d40948668032189ad22a0ad741ac1f645f50;hp=6e945314cb1e109ef4b92fd34b2eaaef9ea83686;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/compiler/main/DriverPhases.hs b/compiler/main/DriverPhases.hs index 6e94531..b684d0e 100644 --- a/compiler/main/DriverPhases.hs +++ b/compiler/main/DriverPhases.hs @@ -7,6 +7,13 @@ -- ----------------------------------------------------------------------------- +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings +-- for details + module DriverPhases ( HscSource(..), isHsBoot, hscSourceString, Phase(..), @@ -71,6 +78,7 @@ data Phase | Cpp HscSource | HsPp HscSource | Hsc HscSource + | Ccpp | Cc | HCc -- Haskellised C (as opposed to vanilla C) compilation | Mangle -- assembly mangling, now done by a separate script. @@ -99,6 +107,7 @@ eqPhase (Unlit _) (Unlit _) = True eqPhase (Cpp _) (Cpp _) = True eqPhase (HsPp _) (HsPp _) = True eqPhase (Hsc _) (Hsc _) = True +eqPhase Ccpp Ccpp = True eqPhase Cc Cc = True eqPhase HCc HCc = True eqPhase Mangle Mangle = True @@ -129,6 +138,7 @@ nextPhase Mangle = SplitMangle nextPhase SplitMangle = As nextPhase As = SplitAs nextPhase SplitAs = StopLn +nextPhase Ccpp = As nextPhase Cc = As nextPhase CmmCpp = Cmm nextPhase Cmm = HCc @@ -145,10 +155,10 @@ startPhase "hspp" = Hsc HsSrcFile startPhase "hcr" = Hsc ExtCoreFile startPhase "hc" = HCc startPhase "c" = Cc -startPhase "cpp" = Cc +startPhase "cpp" = Ccpp startPhase "C" = Cc -startPhase "cc" = Cc -startPhase "cxx" = Cc +startPhase "cc" = Ccpp +startPhase "cxx" = Ccpp startPhase "raw_s" = Mangle startPhase "split_s" = SplitMangle startPhase "s" = As @@ -171,6 +181,7 @@ phaseInputExt (Hsc _) = "hspp" -- intermediate only -- because runPipeline uses the StopBefore phase to pick the -- output filename. That could be fixed, but watch out. phaseInputExt HCc = "hc" +phaseInputExt Ccpp = "cpp" phaseInputExt Cc = "c" phaseInputExt Mangle = "raw_s" phaseInputExt SplitMangle = "split_s" -- not really generated @@ -179,10 +190,6 @@ phaseInputExt SplitAs = "split_s" -- not really generated phaseInputExt CmmCpp = "cmm" phaseInputExt Cmm = "cmmcpp" phaseInputExt StopLn = "o" -#ifdef ILX -phaseInputExt Ilx2Il = "ilx" -phaseInputExt Ilasm = "il" -#endif haskellish_src_suffixes = haskellish_user_src_suffixes ++ [ "hspp", "hscpp", "hcr", "cmm" ]