X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Fmain%2FDriverPhases.hs;h=4632babb98e2ae563d2b0a0b53161693725f337f;hb=61de6a58cf88fec88d20e8ee7250a4a519ef6bd9;hp=64344958e501387377f932101b5a3d0f291849d1;hpb=0171936c9092666692c69a7f93fa75af976330cb;p=ghc-hetmet.git diff --git a/ghc/compiler/main/DriverPhases.hs b/ghc/compiler/main/DriverPhases.hs index 6434495..4632bab 100644 --- a/ghc/compiler/main/DriverPhases.hs +++ b/ghc/compiler/main/DriverPhases.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverPhases.hs,v 1.16 2002/03/04 17:01:30 simonmar Exp $ +-- $Id: DriverPhases.hs,v 1.22 2002/09/13 15:02:34 simonpj Exp $ -- -- GHC Driver -- @@ -18,7 +18,9 @@ module DriverPhases ( haskellish_src_file, haskellish_src_suffix, hsbootish_file, hsbootish_suffix, objish_file, objish_suffix, - cish_file, cish_suffix + cish_file, cish_suffix, + isExtCore_file, extcoreish_suffix, + isSourceFile -- :: FilePath -> Bool ) where import DriverUtil @@ -64,6 +66,7 @@ startPhase "lhs" = Unlit startPhase "hs" = Cpp startPhase "hscpp" = HsPp startPhase "hspp" = Hsc +startPhase "hcr" = Hsc startPhase "hs-boot" = HsBoot startPhase "hc" = HCc startPhase "c" = Cc @@ -97,10 +100,11 @@ phaseInputExt Ilx2Il = "ilx" phaseInputExt Ilasm = "il" #endif -haskellish_suffix = (`elem` [ "hs", "hspp", "hscpp", "lhs", "hc", "raw_s" ]) -haskellish_src_suffix = (`elem` [ "hs", "hspp", "hscpp", "lhs" ]) +haskellish_suffix = (`elem` [ "hs", "lhs", "hspp", "hscpp", "hcr", "hc", "raw_s" ]) +haskellish_src_suffix = (`elem` [ "hs", "lhs", "hspp", "hscpp", "hcr"]) cish_suffix = (`elem` [ "c", "cpp", "C", "cc", "cxx", "s", "S" ]) hsbootish_suffix = (`elem` [ "hs-boot" ]) +extcoreish_suffix = (`elem` [ "hcr" ]) #if mingw32_TARGET_OS || cygwin32_TARGET_OS objish_suffix = (`elem` [ "o", "O", "obj", "OBJ" ]) @@ -113,3 +117,10 @@ haskellish_src_file = haskellish_src_suffix . getFileSuffix cish_file = cish_suffix . getFileSuffix objish_file = objish_suffix . getFileSuffix hsbootish_file = hsbootish_suffix . getFileSuffix + +isExtCore_file = extcoreish_suffix . getFileSuffix + +isSourceFile :: FilePath -> Bool +isSourceFile f = + haskellish_file f || + cish_file f