
On May 8, 2010, at 08:49 , Gwern Branwen wrote:
On Fri, May 7, 2010 at 11:42 PM, Brandon S. Allbery KF8NH
wrote: On May 7, 2010, at 17:00 , Gwern Branwen wrote:
"-outputdir dir
The -outputdir option is shorthand for the combination of -odir, -hidir, and -stubdir."
So if we used "-outputdir /dev/null", we don't have to worry about
I expect you'll get a "Not a directory" diagnostic from GHC about that one, unless GHC itself special-cases /dev/null.
Bleh, unfortunately it doesn't seem to.
'/dev/null/Main.o: getModificationTime: inappropriate type (Not a directory)'
Do you know of any similar directories we could use in place of /dev/ null?
No; and in any case, I don't think you could get away with it because ghc is using those .hi and .o files internally (including passing the .o files to ld), so they have to go *somewhere*. And Unix doesn't have the notion of a temporary directory that goes away when the creating process exits, as it has for files (the open-and-unlink idiom); and there are problems with providing one. I think what you really want is for ghc to have a treat-intermediate- files-in-this-session-as-ephemeral flag, such that the .hi and .o files created during a ghc invocation are removed after the link step. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH