From: Pepe Iborra Date: Sat, 20 Jan 2007 18:52:49 +0000 (+0000) Subject: Add obtainTerm1 to the GHC api X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=9a37b33443be07667867dabb5b67b1319231e648 Add obtainTerm1 to the GHC api --- diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 32bcf25..6855f94 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -87,7 +87,7 @@ module GHC ( lookupName, getBreakpointHandler, setBreakpointHandler, - obtainTerm, + obtainTerm, obtainTerm1, #endif -- * Abstract syntax elements @@ -2292,6 +2292,9 @@ mkSite :: SiteInfo -> BkptLocation Module mkSite (pkgName, modName, sitenum) = (mkModule (stringToPackageId pkgName) (mkModuleName modName), sitenum) +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 sess force id = withSession sess $ \hsc_env -> do mb_v <- getHValue (varName id)