ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions
Safe HaskellIgnore
LanguageGHC2021

GHC.Runtime.Interpreter.Types

Description

Types used by the runtime interpreter

Synopsis

Documentation

data Interp #

Interpreter

Constructors

Interp 

Fields

data InterpInstance #

Constructors

ExternalInterp !ExtInterp

External interpreter

data InterpProcess #

Constructors

InterpProcess 

Fields

data ExtInterpInstance c #

Common field between native external interpreter and the JS one

Constructors

ExtInterpInstance 

Fields

  • instProcess :: !InterpProcess

    External interpreter process and its pipe (communication channel)

  • instPendingFrees :: !(MVar [HValueRef])

    Values that need to be freed before the next command is sent. Finalizers for ForeignRefs can append values to this list asynchronously.

  • instExtra :: !c

    Instance specific extra fields

data ExtInterpState cfg details #

External interpreter

The external interpreter is spawned lazily (on first use) to avoid slowing down sessions that don't require it. The contents of the MVar reflects the state of the interpreter (running or not).

Constructors

ExtInterpState 

Fields

data InterpStatus inst #

Status of an external interpreter

Constructors

InterpPending

Not spawned yet

InterpRunning !inst

Running

InterpSymbolCache

data InterpSymbolCache #

Constructors

InterpSymbolCache 

Fields

purgeInterpSymbolCache :: InterpSymbolCache -> IO () #

Clear all symbol caches.

data InterpSymbol (s :: SuffixOrInterpreted) where #

Instances

Instances details
Outputable (InterpSymbol s) # 
Instance details

Defined in GHC.Runtime.Interpreter.Types.SymbolCache

Methods

ppr :: InterpSymbol s -> SDoc #

interpSymbolName :: forall (s :: Symbol). InterpSymbol ('Suffix s) -> Name #

eliminateInterpSymbol :: forall (s :: SuffixOrInterpreted) r. InterpSymbol s -> (InterpSymbol 'Interpreted -> r) -> (forall (x :: Symbol). InterpSymbol ('Suffix x) -> r) -> r #

interpreterProfiled :: Interp -> Bool #

Interpreter uses Profiling way

interpreterDynamic :: Interp -> Bool #

Interpreter uses Dynamic way

IServ

data IServConfig #

Configuration needed to spawn an external interpreter

Constructors

IServConfig 

Fields

JSInterp

data JSInterpExtra #

Constructors

JSInterpExtra 

Fields

data JSState #

Constructors

JSState 

Fields

data NodeJsSettings #

NodeJs configuration

Constructors

NodeJsSettings 

Fields

data WasmInterpConfig #

Constructors

WasmInterpConfig 

Fields