X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FGHC.hs;h=638e1dba37ab1199b3e64ec92608b0cff46cb226;hb=d196d84a6a6fbd128da207c03b1c5f29fb24e6a4;hp=c3aa8323deaacaf0520415371373080b7d220080;hpb=e95ee1f718c6915c478005aad8af81705357d6ab;p=ghc-hetmet.git diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index c3aa832..638e1db 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -36,12 +36,6 @@ module GHC ( removeTarget, guessTarget, - -- * Extending the program scope - extendGlobalRdrScope, - setGlobalRdrScope, - extendGlobalTypeScope, - setGlobalTypeScope, - -- * Loading\/compiling the program depanal, load, loadWithLogger, LoadHowMuch(..), @@ -596,31 +590,6 @@ guessTarget str Nothing target tid = Target tid obj_allowed Nothing -- ----------------------------------------------------------------------------- --- Extending the program scope - -extendGlobalRdrScope :: GhcMonad m => [GlobalRdrElt] -> m () -extendGlobalRdrScope rdrElts - = modifySession $ \hscEnv -> - let global_rdr = hsc_global_rdr_env hscEnv - in hscEnv{ hsc_global_rdr_env = foldl extendGlobalRdrEnv global_rdr rdrElts } - -setGlobalRdrScope :: GhcMonad m => [GlobalRdrElt] -> m () -setGlobalRdrScope rdrElts - = modifySession $ \hscEnv -> - hscEnv{ hsc_global_rdr_env = foldl extendGlobalRdrEnv emptyGlobalRdrEnv rdrElts } - -extendGlobalTypeScope :: GhcMonad m => [Id] -> m () -extendGlobalTypeScope ids - = modifySession $ \hscEnv -> - let global_type = hsc_global_type_env hscEnv - in hscEnv{ hsc_global_type_env = extendTypeEnvWithIds global_type ids } - -setGlobalTypeScope :: GhcMonad m => [Id] -> m () -setGlobalTypeScope ids - = modifySession $ \hscEnv -> - hscEnv{ hsc_global_type_env = extendTypeEnvWithIds emptyTypeEnv ids } - --- ----------------------------------------------------------------------------- -- Loading the program -- | Perform a dependency analysis starting from the current targets @@ -2289,7 +2258,7 @@ preprocessFile hsc_env src_fn mb_phase (Just (buf, _time)) | Just (Unlit _) <- mb_phase = True | Nothing <- mb_phase, Unlit _ <- startPhase src_fn = True -- note: local_opts is only required if there's no Unlit phase - | dopt Opt_Cpp dflags' = True + | xopt Opt_Cpp dflags' = True | dopt Opt_Pp dflags' = True | otherwise = False @@ -2372,7 +2341,7 @@ getModuleGraph = liftM hsc_mod_graph getSession -- have Template Haskell enabled whether it is actually needed or not. needsTemplateHaskell :: ModuleGraph -> Bool needsTemplateHaskell ms = - any (dopt Opt_TemplateHaskell . ms_hspp_opts) ms + any (xopt Opt_TemplateHaskell . ms_hspp_opts) ms -- | Return @True@ <==> module is loaded. isLoaded :: GhcMonad m => ModuleName -> m Bool