- return (HscRecomp False, new_iface, details)
-
-hscNewBackEnd :: BackEnd ModGuts (ModIface, ModDetails, CgGuts)
-hscNewBackEnd hsc_env mod_summary maybe_old_iface ds_result
- = do { -- OMITTED:
- -- ; seqList imported_modules (return ())
-
- let dflags = hsc_dflags hsc_env
-
- -------------------
- -- FLATTENING
- -------------------
- ; flat_result <- {-# SCC "Flattening" #-}
- flatten hsc_env ds_result
-
-
-{- TEMP: need to review space-leak fixing here
- NB: even the code generator can force one of the
- thunks for constructor arguments, for newtypes in particular
-
- ; let -- Rule-base accumulated from imported packages
- pkg_rule_base = eps_rule_base (hsc_EPS hsc_env)
-
- -- In one-shot mode, ZAP the external package state at
- -- this point, because we aren't going to need it from
- -- now on. We keep the name cache, however, because
- -- tidyCore needs it.
- pcs_middle
- | one_shot = pcs_tc{ pcs_EPS = error "pcs_EPS missing" }
- | otherwise = pcs_tc
-
- ; pkg_rule_base `seq` pcs_middle `seq` return ()
--}
-
- -- alive at this point:
- -- pcs_middle
- -- flat_result
- -- pkg_rule_base
-
- -------------------
- -- SIMPLIFY
- -------------------
- ; simpl_result <- {-# SCC "Core2Core" #-}
- core2core hsc_env flat_result
-
+ return (new_iface, no_change, details, ds_result)
+
+hscNormalIface :: ModGuts -> Comp (ModIface, Bool, ModDetails, CgGuts)
+hscNormalIface simpl_result
+ = do hsc_env <- gets compHscEnv
+ mod_summary <- gets compModSummary
+ maybe_old_iface <- gets compOldIface
+ liftIO $ do