[xmonad] darcs patch: Clean .hi and .o files when recompiling

Gwern Branwen gwern0 at gmail.com
Sat Apr 10 12:08:09 EDT 2010


On Mon, Apr 5, 2010 at 2:17 PM, Gwern Branwen <gwern0 at gmail.com> wrote:
> On Mon, Mar 22, 2010 at 6:53 PM, Daniel Schoepe
> <daniel.schoepe at googlemail.com> wrote:
>> Excerpts from Gwern Branwen's message of Mon Mar 22 21:37:24 +0100 2010:
>>> ? (Can we hardcode /tmp?)
>>
>> We could use System.Directory.getTemporaryDirectory just to be on the safe
>> side.
>
> Sure. So:
>
> hunk ./XMonad/Core.hs 446
> +    tmp <- getTemporaryDirectory
> hunk ./XMonad/Core.hs 461
> -            waitForProcess =<< runProcess "ghc" ["--make",
> "xmonad.hs", "-i", "-ilib", "-fforce-recomp", "-v0", "-o",binn] (Just
> dir)
> +            waitForProcess =<< runProcess "ghc" ["--make",
> "xmonad.hs", "-i", "-ilib", "-fforce-recomp", "-hidir", tmp, "-odir",
> "/tmp", "-v0", "-o",binn] (Just dir)
>
> Note that this compiles and leaves in my /tmp a Main.o and a Main.hi,
> with no intermediates in ~/.xmonad, but xmonad --restart doesn't seem
> to work for me; I am unsure whether the failure of --restart is part
> of my general bugginess or related to this edit. Other people trying
> it out would be good.

Since no one has tried this, or tried it and complained, I'm sending
in a patch to do this.

-- 
gwern


More information about the xmonad mailing list