import LoadIface ( ifaceStats, initExternalPackageState )
import PrelInfo ( wiredInThings, basicKnownKeyNames )
import MkIface ( checkOldIface, mkIface, writeIfaceFile )
-import Desugar
+import Desugar ( deSugar )
import Flattening ( flatten )
-import SimplCore
+import SimplCore ( core2core )
import TidyPgm ( tidyProgram, mkBootModDetails )
import CorePrep ( corePrepPgm )
import CoreToStg ( coreToStg )
import DynFlags
import ErrUtils
-import Util
import UniqSupply ( mkSplitUniqSupply )
import Outputable
import Maybes ( expectJust )
import Bag ( unitBag )
import Monad ( when )
-import Maybe ( isJust )
import IO
import DATA_IOREF ( newIORef, readIORef )
\end{code}
= compiler hsc_env mod_summary
where mkComp = hscMkCompiler norecompMake
backend = case hscTarget (hsc_dflags hsc_env) of
- HscNothing -> hscCodeGenSimple (\(i, d, g) -> (HscRecomp False, i, d))
+ HscNothing -> hscCodeGenNothing
_other -> hscCodeGenMake
compiler
= case ms_hsc_src mod_summary of
cg_dep_pkgs = dependencies } = cgguts
dflags = hsc_dflags hsc_env
location = ms_location mod_summary
- modName = ms_mod mod_summary
data_tycons = filter isDataTyCon tycons
-- cg_tycons includes newtypes, for the benefit of External Core,
-- but we don't generate any code for newtypes
hscCodeGenIdentity :: CodeGen a a
hscCodeGenIdentity hsc_env mod_summary a = return a
-hscCodeGenSimple :: (a -> b) -> CodeGen a b
-hscCodeGenSimple fn hsc_env mod_summary a = return (fn a)
-
hscCodeGenConst :: b -> CodeGen a b
hscCodeGenConst b hsc_env mod_summary a = return b
cg_dep_pkgs = dependencies } = cgguts
dflags = hsc_dflags hsc_env
location = ms_location mod_summary
- modName = ms_mod mod_summary
data_tycons = filter isDataTyCon tycons
-- cg_tycons includes newtypes, for the benefit of External Core,
-- but we don't generate any code for newtypes