X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fmain%2FHscTypes.lhs;h=5c41f68e854233b18ead811fd49f9a4812178060;hb=d2ce0f52d42edf32bb9f13796e6ba6edba8bd516;hp=f424089594d30dc7f66f9386f58c3d098102283f;hpb=5c61fd637c1f3f47cddb523b33be95baa29716eb;p=ghc-hetmet.git diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index f424089..5c41f68 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -129,7 +129,7 @@ import Id import Type import Annotations -import Class ( Class, classSelIds, classATs, classTyCon ) +import Class ( Class, classAllSelIds, classATs, classTyCon ) import TyCon import DataCon ( DataCon, dataConImplicitIds, dataConWrapId ) import PrelNames ( gHC_PRIM ) @@ -146,7 +146,7 @@ import Maybes ( orElse, expectJust, catMaybes ) import Outputable import BreakArray import SrcLoc ( SrcSpan, Located(..) ) -import LazyUniqFM ( lookupUFM, eltsUFM, emptyUFM ) +import UniqFM ( lookupUFM, eltsUFM, emptyUFM ) import UniqSupply ( UniqSupply ) import FastString import StringBuffer ( StringBuffer ) @@ -325,6 +325,12 @@ instance ExceptionMonad Ghc where Ghc $ \s -> unGhc act s `gcatch` \e -> unGhc (handle e) s gblock (Ghc m) = Ghc $ \s -> gblock (m s) gunblock (Ghc m) = Ghc $ \s -> gunblock (m s) + gmask f = + Ghc $ \s -> gmask $ \io_restore -> + let + g_restore (Ghc m) = Ghc $ \s -> io_restore (m s) + in + unGhc (f g_restore) s instance WarnLogMonad Ghc where setWarnings warns = Ghc $ \(Session _ wref) -> writeIORef wref warns @@ -357,6 +363,12 @@ instance ExceptionMonad m => ExceptionMonad (GhcT m) where GhcT $ \s -> unGhcT act s `gcatch` \e -> unGhcT (handle e) s gblock (GhcT m) = GhcT $ \s -> gblock (m s) gunblock (GhcT m) = GhcT $ \s -> gunblock (m s) + gmask f = + GhcT $ \s -> gmask $ \io_restore -> + let + g_restore (GhcT m) = GhcT $ \s -> io_restore (m s) + in + unGhcT (f g_restore) s instance MonadIO m => WarnLogMonad (GhcT m) where setWarnings warns = GhcT $ \(Session _ wref) -> liftIO $ writeIORef wref warns @@ -1125,7 +1137,7 @@ data InteractiveContext ic_toplev_scope :: [Module], -- ^ The context includes the "top-level" scope of -- these modules - ic_exports :: [Module], -- ^ The context includes just the exports of these + ic_exports :: [(Module, Maybe (ImportDecl RdrName))], -- ^ The context includes just the exported parts of these -- modules ic_rn_gbl_env :: GlobalRdrEnv, -- ^ The contexts' cached 'GlobalRdrEnv', built from @@ -1321,7 +1333,7 @@ implicitTyThings (AClass cl) -- are only the family decls; they have no implicit things map ATyCon (classATs cl) ++ -- superclass and operation selectors - map AnId (classSelIds cl) + map AnId (classAllSelIds cl) implicitTyThings (ADataCon dc) = -- For data cons add the worker and (possibly) wrapper