X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fmain%2FInteractiveEval.hs;h=26d251d912c6742789d5666e81414148f176565b;hb=ab13303c49618c6224d7c5b5397ac9a98d2e5b6f;hp=b53e015da7c60109fb2bdc23148d69d240ce4791;hpb=feee9bb8151fd592df9ad4d10fc2e418b26f3e2c;p=ghc-hetmet.git diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs index b53e015..26d251d 100644 --- a/compiler/main/InteractiveEval.hs +++ b/compiler/main/InteractiveEval.hs @@ -768,11 +768,9 @@ isModuleInterpreted s mod_summary = withSession s $ \hsc_env -> obtainTerm1 :: Session -> Bool -> Maybe Type -> a -> IO Term obtainTerm1 sess force mb_ty x = withSession sess $ \hsc_env -> cvObtainTerm hsc_env force mb_ty (unsafeCoerce# x) -obtainTerm :: Session -> Bool -> Id -> IO (Maybe Term) +obtainTerm :: Session -> Bool -> Id -> IO Term obtainTerm sess force id = withSession sess $ \hsc_env -> do - mb_v <- Linker.getHValue (varName id) - case mb_v of - Just v -> fmap Just$ cvObtainTerm hsc_env force (Just$ idType id) v - Nothing -> return Nothing + hv <- Linker.getHValue hsc_env (varName id) + cvObtainTerm hsc_env force (Just$ idType id) hv #endif /* GHCI */