[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).
Showing with 146 additions and 128 deletions