ghc-9.10.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Runtime.Interpreter.JS

Description

JavaScript interpreter

See Note [The JS interpreter]

Synopsis

Documentation

spawnJSInterp :: JSInterpConfig -> IO (ExtInterpInstance JSInterpExtra) Source #

Spawn a JS interpreter

Run NodeJS with "ghc-interp.js" loaded in. Then load GHCi.Server and its deps (including the rts) and run GHCi.Server.defaultServer.

jsLinkObject :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> FilePath -> [ExportedFun] -> IO () Source #

Link an object file using the given functions as roots

jsLoadFile :: ExtInterpInstance JSInterpExtra -> FilePath -> IO () Source #

Load a JS file in the interpreter

Reexported for convenience

mkExportedModFuns :: Module -> [FastString] -> [ExportedFun] Source #

Given a Module and a set of symbols in the module, package these into an ExportedFun.