Add obtainTerm1 to the GHC api
[ghc-hetmet.git] / compiler / main / GHC.hs
index 32bcf25..6855f94 100644 (file)
@@ -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)