uhc-light-1.1.8.7: src/UHC/Light/Compiler/EHC/CompilePhase/Cleanup.hs
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 :: EHCCompileRunner m => HsName -> EHCompilePhaseT m ()
cpCleanupHSMod modNm
= cpUpdCU modNm
(\e -> e { ecuMbHSSemMod = Nothing
}
)
cpCleanupHS :: EHCCompileRunner m => HsName -> EHCompilePhaseT m ()
cpCleanupHS modNm
= cpUpdCU modNm
(\e -> e { ecuMbHS = Nothing
, ecuMbHSSem = Nothing
}
)
cpCleanupFoldEH :: EHCCompileRunner m => HsName -> EHCompilePhaseT m ()
cpCleanupFoldEH modNm
= cpUpdCU modNm
(\e -> e { ecuMbEH = Nothing
}
)
cpCleanupEH :: EHCCompileRunner m => HsName -> EHCompilePhaseT m ()
cpCleanupEH modNm
= cpUpdCU modNm
(\e -> e { ecuMbEHSem = Nothing
}
)
{-# LINE 64 "src/ehc/EHC/CompilePhase/Cleanup.chs" #-}
cpCleanupCore :: EHCCompileRunner m => [HsName] -> EHCompilePhaseT m ()
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 :: EHCCompileRunner m => HsName -> EHCompilePhaseT m ()
cpCleanupCU modNm
= do { cpUpdCU modNm
(\e -> e { ecuHIInfo = {- HI.hiiRetainAfterCleanup -} (ecuHIInfo e)
, ecuMbOptim = Nothing
}
)
}
cpCleanupFlow :: EHCCompileRunner m => HsName -> EHCompilePhaseT m ()
cpCleanupFlow modNm
= cpUpdCU modNm
(\e -> e { ecuMbHSSemMod = Nothing
-- , ecuMbPrevHI = Nothing
-- , ecuMbPrevHISem = Nothing
-- , ecuMbPrevHIInfo = Nothing
}
)