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

Gwern Branwen gwern0 at gmail.com
Mon Apr 5 14:17:18 EDT 2010

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
+            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.


More information about the xmonad mailing list