2 Jul 2007 21:41
Location of generated files
Neil Mitchell <ndmitchell <at> gmail.com>
2007-07-02 19:41:31 GMT
2007-07-02 19:41:31 GMT
Hi, I'd like to change where Yhc puts generated files. I propose: Every module gets assigned a "root" directory: * foo/Main.hs has a root of "foo". * foo/System/Cmd.hs, module System.Cmd, has a root of "foo". * foo/System/Cmd.hs, module Cmd, has a root of "foo/System". (Note that this is already done when searching for imports) Every file with <ext> (where ext is one of hi, hbc,ycr,yca) will be created in: * foo/Main.hs leads to foo/<dir-ext>/Main.<ext> * foo/System/Cmd.hs, module System.Cmd, leads to foo/<dir-ext>/System.Cmd.<ext> By default, <dir-ext> is "obj" for all extensions. The flag objdir will allow the default <dir-ext> to be changed. The flag <ext>dir will allow the location of <ext> files to be changed. For example --hidir=hi would put all the hi files in foo/hi/Main.hi. --objdir=bar will put all generated files in foo/bar/*.*. There is exactly one exception to this rule: foo/Foo.hs, module Main, creates foo/Foo.hbc, in all circumstances. Comments? If the argument you use relies on some other compiler (GCC/GHC) doing something different, please say _why_ that compilers behaviour is preferable.(Continue reading)
RSS Feed