| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
GHC.Debugger.Runtime.Compile.Cache
Description
A compilation cache which allows us to re-use an already loaded expression/variable rather than recompiling it from scratch.
Synopsis
- data CompCache
- insertCompRaw :: String -> ForeignHValue -> CompCache -> CompCache
- lookupCompRaw :: String -> CompCache -> Maybe ForeignHValue
- emptyCompCache :: CompCache
Documentation
insertCompRaw :: String -> ForeignHValue -> CompCache -> CompCache Source #
Store the result of compiling and loading a raw expression string.
Note: it is easy to wrongly cache arbitrary compilation strings. You shouldn't do this lightly since these arbitrary strings typically are not very cacheable (there won't be many if any hits).
- *Instead, one should always prefer to use
to describe and load remote expression, which will be implicitly cached but at a much finer grained level.**RemoteExpr
lookupCompRaw :: String -> CompCache -> Maybe ForeignHValue Source #
Look if the raw string value of an expression has already been compiled and loaded
emptyCompCache :: CompCache Source #
Nothing in it