Better exit with a failure code in ghc --make if something went wrong...
{-# OPTIONS -fno-warn-incomplete-patterns #-}
-----------------------------------------------------------------------------
{-# OPTIONS -fno-warn-incomplete-patterns #-}
-----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.78 2001/06/29 15:30:49 simonmar Exp $
+-- $Id: Main.hs,v 1.79 2001/07/03 11:14:33 simonmar Exp $
--
-- GHC Driver program
--
--
-- GHC Driver program
--
case mods of
[] -> throwDyn (UsageError "no input files")
mod -> do state <- cmInit Batch
case mods of
[] -> throwDyn (UsageError "no input files")
mod -> do state <- cmInit Batch
- cmLoadModule state mods
+ (_, ok, _) <- cmLoadModule state mods
+ when (not ok) (exitWith (ExitFailure 1))