module GHC.Unit.Module.Status
( HscBackendAction(..), HscRecompStatus (..)
)
where
import GHC.Prelude
import GHC.Unit
import GHC.Unit.Module.ModGuts
import GHC.Unit.Module.ModIface
import GHC.Utils.Fingerprint
import GHC.Utils.Outputable
import GHC.Unit.Home.ModInfo
data HscRecompStatus
= HscUpToDate ModIface HomeModLinkable
| HscRecompNeeded (Maybe Fingerprint)
data HscBackendAction
= HscUpdate ModIface
| HscRecomp
{ HscBackendAction -> CgGuts
hscs_guts :: CgGuts
, HscBackendAction -> ModLocation
hscs_mod_location :: !ModLocation
, HscBackendAction -> PartialModIface
hscs_partial_iface :: !PartialModIface
, HscBackendAction -> Maybe Fingerprint
hscs_old_iface_hash :: !(Maybe Fingerprint)
}
instance Outputable HscBackendAction where
ppr :: HscBackendAction -> SDoc
ppr (HscUpdate ModIface
mi) = forall doc. IsLine doc => String -> doc
text String
"Update:" forall doc. IsLine doc => doc -> doc -> doc
<+> (forall a. Outputable a => a -> SDoc
ppr (forall (phase :: ModIfacePhase). ModIface_ phase -> Module
mi_module ModIface
mi))
ppr (HscRecomp CgGuts
_ ModLocation
ml PartialModIface
_mi Maybe Fingerprint
_mf) = forall doc. IsLine doc => String -> doc
text String
"Recomp:" forall doc. IsLine doc => doc -> doc -> doc
<+> forall a. Outputable a => a -> SDoc
ppr ModLocation
ml