summaryrefslogtreecommitdiff
path: root/ghc/compiler/main/Main.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2001-05-08 10:58:48 +0000
committersimonmar <unknown>2001-05-08 10:58:48 +0000
commitb8b47abe336d17ae5354a9bb15c44564b51c97ef (patch)
tree63e56444d4d5c45a43478e61b48604af72f19fdf /ghc/compiler/main/Main.hs
parentdc673bca305b43342b864445539b49c353dd6a10 (diff)
downloadhaskell-b8b47abe336d17ae5354a9bb15c44564b51c97ef.tar.gz
[project @ 2001-05-08 10:58:48 by simonmar]
Add DriverPhases.haskellish_src_suffix :: String -> Bool DriverPhases.haskellish_src_file :: String -> Bool which return True for suffixes of Haskell source files only. The existing haskellish_suffix and haskellish_file return True also for .raw_s and .hc files. We use these instead of haskellish_file in Main.main when deciding whether to preprocess a file. Fixes: compilation of .raw_s files, and potential bugs with compilation of .hc files.
Diffstat (limited to 'ghc/compiler/main/Main.hs')
-rw-r--r--ghc/compiler/main/Main.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs
index 99b9629220..4678065665 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.63 2001/04/26 13:52:57 simonmar Exp $
+-- $Id: Main.hs,v 1.64 2001/05/08 10:58:48 simonmar Exp $
--
-- GHC Driver program
--
@@ -33,7 +33,7 @@ import DriverFlags
import DriverMkDepend
import DriverUtil
import Panic
-import DriverPhases ( Phase(..), haskellish_file, objish_file )
+import DriverPhases ( Phase(..), haskellish_src_file, objish_file )
import CmdLineOpts
import TmpFiles
import Finder ( initFinder )
@@ -291,8 +291,8 @@ main =
-- OPTIONS pragma that affects the compilation pipeline (eg. -fvia-C)
let (basename, suffix) = splitFilename src
- -- just preprocess
- pp <- if not (haskellish_file src) || mode == StopBefore Hsc
+ -- just preprocess (Haskell source only)
+ pp <- if not (haskellish_src_file src) || mode == StopBefore Hsc
then return src else do
phases <- genPipeline (StopBefore Hsc) stop_flag
False{-not persistent-} defaultHscLang src