X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FLinker.lhs;h=f06a728b9944aa2daa6273e1cb8d44eca286cc38;hb=e940d0ad629747fd30d1dc318a4c1ab893ac7222;hp=640fc9d696c019a51239060804b0d4fbb69c2bec;hpb=2c92736ea5a4aedf263a77d58c6e9b032a05b7ef;p=ghc-hetmet.git diff --git a/compiler/ghci/Linker.lhs b/compiler/ghci/Linker.lhs index 640fc9d..f06a728 100644 --- a/compiler/ghci/Linker.lhs +++ b/compiler/ghci/Linker.lhs @@ -28,7 +28,6 @@ import ByteCodeLink import ByteCodeItbls import ByteCodeAsm import RtClosureInspect -import Var import IfaceEnv import Config import OccName @@ -63,7 +62,6 @@ import Control.Arrow ( second ) import Data.IORef import Data.List import Foreign.Ptr -import GHC.Exts import System.IO import System.Directory @@ -202,7 +200,9 @@ recoverDCInRTS a = do getHValue :: Name -> IO (Maybe HValue) getHValue name = do pls <- readIORef v_PersistentLinkerState - return$ fmap snd (lookupNameEnv (closure_env pls) name) + case lookupNameEnv (closure_env pls) name of + Just (_,x) -> return$ Just x + _ -> return Nothing withExtendedLinkEnv :: [(Name,HValue)] -> IO a -> IO a withExtendedLinkEnv new_env action @@ -728,7 +728,7 @@ linkSomeBCOs toplevs_only ie ce_in de_in ul_bcos let de_additions = [(address, name) | (address, name) <- zip addresses names , not(address `elemAddressEnv` de_in) ] - de_out = extendAddressEnvList' de_in de_additions + de_out = extendAddressEnvList de_in de_additions return ( ce_out, de_out, hvals) where goForRefs = getRefs []