haskell-debugger
Safe HaskellNone
LanguageGHC2021

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

Documentation

data CompCache Source #

Mapping from compile expressions (as strings) to their ForeignHValues

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 RemoteExpr to describe and load remote expression, which will be implicitly cached but at a much finer grained level.**

lookupCompRaw :: String -> CompCache -> Maybe ForeignHValue Source #

Look if the raw string value of an expression has already been compiled and loaded