From 46bc3bbd17945f7e5549ee6da978729f1c185b00 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Mon, 24 Mar 2008 22:58:57 +0000 Subject: [PATCH] Also print compilation errors to stderr --- XMonad/Core.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/XMonad/Core.hs b/XMonad/Core.hs index ecbca29..397c39a 100644 --- a/XMonad/Core.hs +++ b/XMonad/Core.hs @@ -403,6 +403,9 @@ recompile force = io $ do let msg = unlines $ ["Error detected while loading xmonad configuration file: " ++ src] ++ lines ghcErr ++ ["","Please check the file for errors."] + -- nb, the ordering of printing, then forking, is crucial due to + -- lazy evaluation + hPutStrLn stderr msg doubleFork $ executeFile "xmessage" True ["-default", "okay", msg] Nothing return (status == ExitSuccess) else return True