Commit 9a37b334 authored by mnislaih's avatar mnislaih
Browse files

Add obtainTerm1 to the GHC api

parent 790cd00d
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment