module UHC.Light.Compiler.EHC.CompilePhase.Cleanup ( cpCleanupHSMod, cpCleanupHS, cpCleanupFoldEH, cpCleanupEH , cpCleanupCore , cpCleanupCU, cpCleanupFlow ) where import UHC.Light.Compiler.Base.Optimize import UHC.Light.Compiler.EHC.Common import UHC.Light.Compiler.EHC.CompileUnit import UHC.Light.Compiler.EHC.CompileRun import Control.Monad.State {-# LINE 33 "src/ehc/EHC/CompilePhase/Cleanup.chs" #-} cpCleanupHSMod :: HsName -> EHCompilePhase () cpCleanupHSMod modNm = cpUpdCU modNm (\e -> e { ecuMbHSSemMod = Nothing } ) cpCleanupHS :: HsName -> EHCompilePhase () cpCleanupHS modNm = cpUpdCU modNm (\e -> e { ecuMbHS = Nothing , ecuMbHSSem = Nothing } ) cpCleanupFoldEH :: HsName -> EHCompilePhase () cpCleanupFoldEH modNm = cpUpdCU modNm (\e -> e { ecuMbEH = Nothing } ) cpCleanupEH :: HsName -> EHCompilePhase () cpCleanupEH modNm = cpUpdCU modNm (\e -> e { ecuMbEHSem = Nothing } ) {-# LINE 64 "src/ehc/EHC/CompilePhase/Cleanup.chs" #-} cpCleanupCore :: [HsName] -> EHCompilePhase () cpCleanupCore modNmL = cpSeq [cl m | m <- modNmL] where cl m = cpUpdCU m (\e -> e { ecuMbCore = Nothing , ecuMbCoreSem = Nothing , ecuMbCoreSemMod = Nothing } ) {-# LINE 116 "src/ehc/EHC/CompilePhase/Cleanup.chs" #-} cpCleanupCU :: HsName -> EHCompilePhase () cpCleanupCU modNm = do { cpUpdCU modNm (\e -> e { ecuHIInfo = {- HI.hiiRetainAfterCleanup -} (ecuHIInfo e) , ecuMbOptim = Nothing } ) } cpCleanupFlow :: HsName -> EHCompilePhase () cpCleanupFlow modNm = cpUpdCU modNm (\e -> e { ecuMbHSSemMod = Nothing -- , ecuMbPrevHI = Nothing -- , ecuMbPrevHISem = Nothing -- , ecuMbPrevHIInfo = Nothing } )