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.Linker.Types
import GHC.Utils.Outputable
data HscRecompStatus
= HscUpToDate ModIface (Maybe Linkable)
| 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
text String
"Update:" SDoc -> SDoc -> SDoc
<+> (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
text String
"Recomp:" SDoc -> SDoc -> SDoc
<+> ModLocation -> SDoc
forall a. Outputable a => a -> SDoc
ppr ModLocation
ml