module GHC.Corroborate.Divulge (divulgeTyCon, divulgeClass) where import GhcPlugins (TyCon, Module, mkTcOcc) import GHC.TcPluginM.Extra (lookupName ) import TcPluginM (TcPluginM, tcLookupClass, tcLookupTyCon) import Class (Class) divulgeTyCon :: Module -> String -> TcPluginM TyCon divulgeTyCon :: Module -> String -> TcPluginM TyCon divulgeTyCon Module md String s = Name -> TcPluginM TyCon tcLookupTyCon (Name -> TcPluginM TyCon) -> TcPluginM Name -> TcPluginM TyCon forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< Module -> OccName -> TcPluginM Name lookupName Module md (String -> OccName mkTcOcc String s) divulgeClass :: Module -> String -> TcPluginM Class divulgeClass :: Module -> String -> TcPluginM Class divulgeClass Module md String s = Name -> TcPluginM Class tcLookupClass (Name -> TcPluginM Class) -> TcPluginM Name -> TcPluginM Class forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< Module -> OccName -> TcPluginM Name lookupName Module md (String -> OccName mkTcOcc String s)