Safe Haskell | None |
---|---|
Language | GHC2021 |
JavaScript interpreter
See Note [The JS interpreter]
Synopsis
- spawnJSInterp :: JSInterpConfig -> IO (ExtInterpInstance JSInterpExtra)
- jsLinkRts :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> IO ()
- jsLinkInterp :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> IO ()
- jsLinkObject :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> FilePath -> [ExportedFun] -> IO ()
- jsLinkObjects :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> [FilePath] -> (ExportedFun -> Bool) -> IO ()
- jsLoadFile :: ExtInterpInstance JSInterpExtra -> FilePath -> IO ()
- jsRunServer :: ExtInterpInstance JSInterpExtra -> IO ()
- mkExportedModFuns :: Module -> [FastString] -> [ExportedFun]
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.
jsLinkRts :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> IO () Source #
Link JS RTS
jsLinkInterp :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> IO () Source #
Link JS interpreter
jsLinkObject :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> FilePath -> [ExportedFun] -> IO () Source #
Link an object file using the given functions as roots
jsLinkObjects :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> [FilePath] -> (ExportedFun -> Bool) -> IO () Source #
Link object files
jsLoadFile :: ExtInterpInstance JSInterpExtra -> FilePath -> IO () Source #
Load a JS file in the interpreter
jsRunServer :: ExtInterpInstance JSInterpExtra -> IO () Source #
Run JS server
Reexported for convenience
mkExportedModFuns :: Module -> [FastString] -> [ExportedFun] Source #
Given a Module
and a set of symbols in the module, package these into an
ExportedFun
.