Interpreter
Constructors
InterpinterpInstance :: !InterpInstanceInterpreter instance (internal, external)
interpLoader :: !LoaderInterpreter loader
interpSymbolCache :: !InterpSymbolCacheLookupSymbol cache
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11
Moduleghc-lib-parser-9.14.1.20251220GHC2021
Types used by the runtime interpreter
Interpreter
InterpinterpInstance :: !InterpInstanceInterpreter instance (internal, external)
interpLoader :: !LoaderInterpreter loader
interpSymbolCache :: !InterpSymbolCacheLookupSymbol cache
ExternalInterp !ExtInterpExternal interpreter
InterpProcessinterpPipe :: !PipePipe to communicate with the server
interpHandle :: !ProcessHandleProcess handle of the server
interpLock :: !MVar ()Lock to prevent concurrent access to the stream
Common field between native external interpreter and the JS one
ExtInterpInstanceinstProcess :: !InterpProcessExternal 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 :: !cInstance specific extra fields
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).
ExtInterpStateinterpConfig :: !cfginterpStatus :: !ExtInterpStatusVar detailsStatus of an external interpreter
InterpPendingNot spawned yet
InterpRunning !instRunning
InterpSymbolCacheinterpClosureCache :: MVar (SymbolCache "closure"
)interpConInfoCache :: MVar (SymbolCache "con_info"
)interpStaticInfoCache :: MVar (SymbolCache "static_info"
)interpBytesCache :: MVar (SymbolCache "bytes"
)interpFaststringCache :: MVar (UniqFM FastString (Ptr ()))Clear all symbol caches.
IClosureSymbol :: Name -> InterpSymbol ('Suffix "closure"
)IConInfoSymbol :: Name -> InterpSymbol ('Suffix "con_info"
)IStaticInfoSymbol :: Name -> InterpSymbol ('Suffix "static_info"
)IBytesSymbol :: Name -> InterpSymbol ('Suffix "bytes"
)IFaststringSymbol :: FastString -> InterpSymbol 'InterpretedOutputable (InterpSymbol s)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Runtime.Interpreter.Types.SymbolCacheInterpreter uses Profiling way
Interpreter uses Dynamic way
Configuration needed to spawn an external interpreter
IServConfigiservConfProgram :: !StringExternal program to run
iservConfOpts :: ![String]Command-line options
iservConfProfiled :: !BoolUse Profiling way
iservConfDynamic :: !BoolUse Dynamic way
iservConfHook :: !Maybe (CreateProcess -> IO ProcessHandle)Hook
iservConfTrace :: IO ()Trace action executed after spawn
JSInterpExtrainstStdIn :: !HandleStdin for the process
instFinderCache :: !FinderCacheinstFinderOpts :: !FinderOptsinstJSState :: !MVar JSStateMutable state
instGhciUnitId :: !UnitIdGHCi unit-id
JSInterpConfigjsInterpNodeConfig :: !NodeJsSettingsNodeJS settings
jsInterpScript :: !FilePathPath to "ghc-interp.js" script
jsInterpTmpFs :: !TmpFsjsInterpTmpDir :: !TempDirjsInterpLogger :: !LoggerjsInterpCodegenCfg :: !StgToJSConfigjsInterpUnitEnv :: !UnitEnvjsInterpFinderOpts :: !FinderOptsjsInterpFinderCache :: !FinderCacheJSStatejsLinkState :: !LinkPlanLinker state of the interpreter
jsServerStarted :: !BoolIs the Haskell server started?
NodeJs configuration
NodeJsSettingsnodeProgram :: FilePathlocation of node.js program
nodePath :: Maybe FilePathvalue of NODE_PATH environment variable (search path for Node modules; GHCJS used to provide some)
nodeExtraArgs :: [String]extra arguments to pass to node.js
nodeKeepAliveMaxMem :: Integerkeep node.js (TH, GHCJSi) processes alive if they don't use more than this
WasmInterpConfigwasmInterpDyLD :: !FilePathLocation of dyld.mjs script
wasmInterpLibDir :: FilePathwasi-sdk sysroot libdir containing libc.so, etc
wasmInterpOpts :: ![String]Additional command line arguments for iserv
wasmInterpBrowser :: !BoolwasmInterpBrowserHost :: !StringwasmInterpBrowserPort :: !IntwasmInterpBrowserRedirectWasiConsole :: !BoolwasmInterpBrowserPuppeteerLaunchOpts :: !Maybe StringwasmInterpBrowserPlaywrightBrowserType :: !Maybe StringwasmInterpBrowserPlaywrightLaunchOpts :: !Maybe StringwasmInterpTargetPlatform :: !PlatformwasmInterpProfiled :: !BoolAre we profiling yet?
wasmInterpHsSoSuffix :: !StringShared lib filename common suffix sans .so, e.g. p-ghc9.13.20241001
wasmInterpUnitState :: !UnitState