aboutsummaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@galois.com>2007-11-05 04:26:55 +0100
committerDon Stewart <dons@galois.com>2007-11-05 04:26:55 +0100
commitc57e9ddc694cbbf55d717b1f53bdfa2342cae23f (patch)
tree1142806b3de53d586bc51ec5b4a4e44d8bcefd87 /Main.hs
parent756bf1126039f6b7434bb74e787ed8e4414f2eeb (diff)
downloadxmonad-c57e9ddc694cbbf55d717b1f53bdfa2342cae23f.tar.gz
xmonad-c57e9ddc694cbbf55d717b1f53bdfa2342cae23f.tar.xz
xmonad-c57e9ddc694cbbf55d717b1f53bdfa2342cae23f.zip
~/.xmonad/Main.hs is now ~/.xmonad/xmonad.hs !
darcs-hash:20071105032655-cba2c-0ac7caedabda07767e6d865b32f5ece72e1a5944.gz
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs21
1 files changed, 10 insertions, 11 deletions
diff --git a/Main.hs b/Main.hs
index 8923555..51b5216 100644
--- a/Main.hs
+++ b/Main.hs
@@ -30,25 +30,24 @@ import System.Posix.Process (executeFile)
main :: IO ()
main = do
handle (hPrint stderr) buildLaunch
- -- if buildLaunch returns, execute the trusted core
- xmonad defaultConfig
+ xmonad defaultConfig -- if buildLaunch returns, execute the trusted core
--- | Build "~/.xmonad/Main.hs" with ghc, then execute it. If there are no
+-- | Build "~/.xmonad/xmonad.hs" with ghc, then execute it. If there are no
-- errors, this function does not return. An exception is raised in any of
-- these cases:
--- * ghc missing
--- * ~/.xmonad/Main.hs missing
--- * Main.hs fails to compile
--- * Missing xmonad/XMonadContrib modules due to ghc upgrade
+-- * ghc missing
+-- * ~/.xmonad/xmonad.hs missing
+-- * xmonad.hs fails to compile
+-- ** wrong ghc in path (fails to compile)
+-- ** type error, syntax error, ..
+-- * Missing xmonad/XMonadContrib modules due to ghc upgrade
--
buildLaunch :: IO ()
buildLaunch = do
dir <- fmap (++ "/.xmonad") getHomeDirectory
- pid <- runProcess "ghc" ["--make", "Main.hs"] (Just dir)
+ pid <- runProcess "ghc" ["--make", "xmonad.hs"] (Just dir)
Nothing Nothing Nothing Nothing
ExitSuccess <- waitForProcess pid
-
args <- getArgs
- executeFile (dir ++ "/Main") False args Nothing
+ executeFile (dir ++ "/xmonad") False args Nothing
return ()
-