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) = String -> SDoc
forall doc. IsLine doc => String -> doc
text String
"Update:" SDoc -> SDoc -> SDoc
forall doc. IsLine doc => doc -> doc -> doc
<+> (Module -> SDoc
forall a. Outputable a => a -> SDoc
ppr (ModIface -> Module
forall (phase :: ModIfacePhase). ModIface_ phase -> Module
mi_module ModIface
mi))
ppr (HscRecomp CgGuts
_ ModLocation
ml PartialModIface
_mi Maybe Fingerprint
_mf) = String -> SDoc
forall doc. IsLine doc => String -> doc
text String
"Recomp:" SDoc -> SDoc -> SDoc
forall doc. IsLine doc => doc -> doc -> doc
<+> ModLocation -> SDoc
forall a. Outputable a => a -> SDoc
ppr ModLocation
ml