X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FGHC.hs;h=72806cbf94daf1ff280fc37f049990d237be3c06;hb=840554d7c158dd8759139f247f7f46c1f643d5a4;hp=a5d82b86e0f392fe89b72ccd929f7e400d630710;hpb=74f14cbc3c51135809977b29427c7c6a2af2cc34;p=ghc-hetmet.git diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index a5d82b8..72806cb 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -289,8 +289,6 @@ import Annotations import Module import LazyUniqFM import qualified UniqFM as UFM -import UniqSet -import Unique import FiniteMap import Panic import Digraph @@ -373,7 +371,7 @@ defaultCleanupHandler :: (ExceptionMonad m, MonadIO m) => DynFlags -> m a -> m a defaultCleanupHandler dflags inner = -- make sure we clean up after ourselves - inner `gonException` + inner `gfinally` (liftIO $ do cleanTempFiles dflags cleanTempDirs dflags @@ -2376,14 +2374,10 @@ getBindings = withSession $ \hsc_env -> -- we have to implement the shadowing behaviour of ic_tmp_ids here -- (see InteractiveContext) and the quickest way is to use an OccEnv. let - tmp_ids = ic_tmp_ids (hsc_IC hsc_env) - filtered = foldr f (const []) tmp_ids emptyUniqSet - f id rest set - | uniq `elementOfUniqSet` set = rest set - | otherwise = AnId id : rest (addOneToUniqSet set uniq) - where uniq = getUnique (nameOccName (idName id)) + occ_env = mkOccEnv [ (nameOccName (idName id), AnId id) + | id <- ic_tmp_ids (hsc_IC hsc_env) ] in - return filtered + return (occEnvElts occ_env) getPrintUnqual :: GhcMonad m => m PrintUnqualified getPrintUnqual = withSession $ \hsc_env ->