From: simonmar Date: Wed, 3 Jan 2001 11:48:06 +0000 (+0000) Subject: [project @ 2001-01-03 11:48:06 by simonmar] X-Git-Tag: Approximately_9120_patches~2982 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=78958d8a356b5e11c1064c8746ec8677265dd5af;p=ghc-hetmet.git [project @ 2001-01-03 11:48:06 by simonmar] don't try to preprocess non-haskellish source files. --- diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs index 5f5024a..b4fd16d 100644 --- a/ghc/compiler/main/Main.hs +++ b/ghc/compiler/main/Main.hs @@ -1,6 +1,6 @@ {-# OPTIONS -fno-warn-incomplete-patterns #-} ----------------------------------------------------------------------------- --- $Id: Main.hs,v 1.43 2001/01/03 11:13:43 simonmar Exp $ +-- $Id: Main.hs,v 1.44 2001/01/03 11:48:06 simonmar Exp $ -- -- GHC Driver program -- @@ -33,7 +33,7 @@ import DriverFlags import DriverMkDepend import DriverUtil import Panic -import DriverPhases ( Phase(..) ) +import DriverPhases ( Phase(..), haskellish_file ) import CmdLineOpts ( HscLang(..), DynFlags(..), v_Static_hsc_opts ) import TmpFiles import Finder ( initFinder ) @@ -74,9 +74,7 @@ import Maybe -- Win32 support: proper signal handling -- make sure OPTIONS in .hs file propogate to .hc file if -C or -keep-hc-file-too -- reading the package configuration file is too slow --- -H, -K, -Rghc-timing --- hi-diffs --- -ddump-all doesn't do anything +-- -K ----------------------------------------------------------------------------- -- Differences vs. old driver: @@ -274,7 +272,8 @@ main = let (basename, suffix) = splitFilename src -- just preprocess - pp <- if mode == StopBefore Hsc then return src else do + pp <- if not (haskellish_file src) || mode == StopBefore Hsc + then return src else do phases <- genPipeline (StopBefore Hsc) stop_flag False{-not persistent-} defaultHscLang src pipeLoop phases src False{-no linking-} False{-no -o flag-}