[xmonad] Re: darcs patch: XMonad.Core: rw recompilation

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sat May 8 15:42:53 EDT 2010


On May 8, 2010, at 08:49 , Gwern Branwen wrote:
> On Fri, May 7, 2010 at 11:42 PM, Brandon S. Allbery KF8NH
> <allbery at ece.cmu.edu> 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 at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/xmonad/attachments/20100508/f080221e/PGP.bin


More information about the xmonad mailing list