-- The official GHC API
import qualified GHC
-import GHC ( Session, DynFlags(..), GhcMode(..), HscTarget(..) )
+import GHC ( Session, DynFlags(..), GhcMode(..), HscTarget(..),
+ LoadHowMuch(..) )
import CmdLineParser
-- Implementations of the various modes (--show-iface, mkdependHS. etc.)
doMake sess srcs = do
targets <- mapM GHC.guessTarget srcs
GHC.setTargets sess targets
- ok_flag <- GHC.load sess Nothing
+ ok_flag <- GHC.load sess LoadAllTargets
when (failed ok_flag) (exitWith (ExitFailure 1))
return ()