projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add obtainTerm1 to the GHC api
[ghc-hetmet.git]
/
compiler
/
main
/
GHC.hs
diff --git
a/compiler/main/GHC.hs
b/compiler/main/GHC.hs
index
32bcf25
..
6855f94
100644
(file)
--- a/
compiler/main/GHC.hs
+++ b/
compiler/main/GHC.hs
@@
-87,7
+87,7
@@
module GHC (
lookupName,
getBreakpointHandler, setBreakpointHandler,
lookupName,
getBreakpointHandler, setBreakpointHandler,
- obtainTerm,
+ obtainTerm, obtainTerm1,
#endif
-- * Abstract syntax elements
#endif
-- * Abstract syntax elements
@@
-2292,6
+2292,9
@@
mkSite :: SiteInfo -> BkptLocation Module
mkSite (pkgName, modName, sitenum) =
(mkModule (stringToPackageId pkgName) (mkModuleName modName), sitenum)
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)
obtainTerm :: Session -> Bool -> Id -> IO (Maybe Term)
obtainTerm sess force id = withSession sess $ \hsc_env -> do
mb_v <- getHValue (varName id)