summaryrefslogtreecommitdiff
path: root/ghc/compiler/main/Main.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2003-07-17 12:04:54 +0000
committersimonmar <unknown>2003-07-17 12:04:54 +0000
commit6677029a5084f59b4cd35d76ce3f19b154f2ac87 (patch)
tree08da4b511244d9e7533255efc9ebc2134310df84 /ghc/compiler/main/Main.hs
parent2a86ebc211c02271fa035f5834eb9f0b2e3bd6e5 (diff)
downloadhaskell-6677029a5084f59b4cd35d76ce3f19b154f2ac87.tar.gz
[project @ 2003-07-17 12:04:50 by simonmar]
Filename-related cleanup & fixes -------------------------------- This commit rationalises some of our filename policies. The new story is this: When compiling a Haskell module A.B.C: The object file is placed in <obj-path>/A/B/C.o The interface file is placed in <hi-path>/A/B/C.hi Where <objpath> is - the argument of the -odir flag, if one was given - the element of the search path in which the source file was found, when in --make mode. - "." otherwise. Where <hipath> is - the argument of the -hidir flag, if one was given - the element of the search path in which the source file was found, when in --make mode. - "." otherwise. NOTE, in particular, that the name of the source file has no bearing on the name of the object or interface file any more. This is a nchange from the previous semantics, where the name of the object file would, under certain circumstances, follow the name of the source file. eg. before, if you said ghc -c dir/foo.hs you would get dir/foo.o. Now, you get something like Main.o, depending on what module is in foo.hs. This means that the driver pipeline machinery now needs to pass around a Maybe ModLocation, which is filled in by the Hsc phase and used later on to figure out the name of the object file (this was fairly painful, but seems to be the only way to get the right behaviour).
Diffstat (limited to 'ghc/compiler/main/Main.hs')
-rw-r--r--ghc/compiler/main/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs
index 29039de23f..f9f64cbcf4 100644
--- a/ghc/compiler/main/Main.hs
+++ b/ghc/compiler/main/Main.hs
@@ -1,7 +1,7 @@
{-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-}
-----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.129 2003/07/16 13:33:55 simonmar Exp $
+-- $Id: Main.hs,v 1.130 2003/07/17 12:04:53 simonmar Exp $
--
-- GHC Driver program
--
@@ -318,7 +318,7 @@ compileFile mode stop_flag src = do
| mode==DoLink || mode==DoMkDLL = Nothing
| otherwise = o_file
- runPipeline mode stop_flag True maybe_o_file src
+ runPipeline mode stop_flag True maybe_o_file src Nothing{-no ModLocation-}
-- ----------------------------------------------------------------------------