Interpreter
Constructors
InterpinterpInstance :: !InterpInstanceInterpreter instance (internal, external)
interpLoader :: !LoaderInterpreter loader
interpLookupSymbolCache :: !MVar (UniqFM FastString (Ptr ()))LookupSymbol cache
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Moduleghc-9.10.3GHC2021
Types used by the runtime interpreter
Interpreter
InterpinterpInstance :: !InterpInstanceInterpreter instance (internal, external)
interpLoader :: !LoaderInterpreter loader
interpLookupSymbolCache :: !MVar (UniqFM FastString (Ptr ()))LookupSymbol cache
ExternalInterp !ExtInterpExternal interpreter
InternalInterpInternal interpreter
InterpProcessinterpPipe :: !PipePipe to communicate with the server
interpHandle :: !ProcessHandleProcess handle of the server
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
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