| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
GHC.Debugger.Runtime.Compile
Description
A interface to compiling and loading expressionsvaluesvariables into the debuggee runtime.
You should prefer this interface to the GHC's compileExprRemote whenever
the loaded expression would benefit from being cached and re-used, to avoid
recompilation and loading.
Even better, you should **always prefer** to use the RemoteExpr abstraction
for constructing and evaluating expressions on the remote debuggee process.
In it, there is finer grained caching and a good interface for constructing
(possibly complex) expressions.
Synopsis
- compileVar :: ModuleName -> String -> [String] -> Debugger ForeignHValue
- compileRaw :: String -> Debugger ForeignHValue
Documentation
compileVar :: ModuleName -> String -> [String] -> Debugger ForeignHValue Source #
compileRaw :: String -> Debugger ForeignHValue Source #
Compile and load a raw expression string.
Note: it is easy to wrongly cache arbitrary compilation strings. You
shouldn't use copmileRaw lightly since these arbitrary strings typically
are not very cacheable (there won't be many if any hits).
If you need an expression more complex than a single variable specialized at
a few types, or even then, you should just prefer to use to
describe and load that remote expression. RemoteExprRemoteExpr will cache the
relevant bits (loading of external names) at the right granularity while not
caching, say, chains of function applications, which can be trivially
executed on the remote process in a single go without any compilation.
User beware!