summaryrefslogtreecommitdiff
path: root/Coolbal/Target.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Coolbal/Target.hs')
-rw-r--r--Coolbal/Target.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Coolbal/Target.hs b/Coolbal/Target.hs
index 761f19d..64a0a16 100644
--- a/Coolbal/Target.hs
+++ b/Coolbal/Target.hs
@@ -111,17 +111,16 @@ instance IsTarget ExeTarget where
,map (intercalate ".") (exeTargetModules tg)
,["-o", binName]
,exeTargetFlags tg])
- >>= checkExitCode "ghc"
+ >>= checkExitCode
targetExecute tg = Just $ \projdir args -> do
let filename = escapeFileName (exeTargetName tg)
rawSystem (projdir </> "dist-coolbal/bin" </> filename) args
>>= exitWith
-checkExitCode :: String -> ExitCode -> IO ()
-checkExitCode _ ExitSuccess = return ()
-checkExitCode procname (ExitFailure c) =
- die (procname ++ " exited with code " ++ show c)
+checkExitCode :: ExitCode -> IO ()
+checkExitCode ExitSuccess = return ()
+checkExitCode c@(ExitFailure _) = exitWith c
escapeFileName :: String -> FilePath
escapeFileName =