HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

High-level interface to the interpreter

datadata EvalStatus_ a b
#
Instances4Show, Generic, Binary, Rep
datadata EvalResult a
#
Instances4Show, Generic, Binary, Rep
datadata EvalExpr a

We can pass simple expressions to EvalStmt, consisting of values and application. This allows us to wrap the statement to be executed in another function, which is used by GHCi to implement :set args and :set prog. It might be worthwhile to extend this little language in the future.

Constructors

Instances4Show, Generic, Binary, Rep

The object-code linker

loadDLLs loads dynamic libraries using the OS's native linker (i.e. dlopen() on Unix, LoadLibrary() on Windows). It takes either absolute pathnames to the files, or relative filenames (e.g. "libfoo.so" or "foo.dll"). In the latter case, loadDLLs searches the standard locations for the appropriate libraries.

valueinterpCmd :: Binary a => Interp -> Message a -> IO a

Run a command in the interpreter's context. With -fexternal-interpreter, the command is serialized and sent to an external iserv process, and the response is deserialized (hence the Binary constraint). With -fno-external-interpreter we execute the command directly here.

valuewormhole :: Interp -> ForeignRef a -> IO a

Convert a ForeignRef to the value it references directly. This only works when the interpreter is running in the same process as the compiler, so it fails when -fexternal-interpreter is on.

valuewormholeRef :: Interp -> RemoteRef a -> IO a

Convert an RemoteRef to the value it references directly. This only works when the interpreter is running in the same process as the compiler, so it fails when -fexternal-interpreter is on.

Reexport for convenience

datadata Message a where

A Message a is a message that returns a value of type a. These are requests sent from GHC to the server.

Constructors

Instances1Show
  • Show (Message a)Defined in ghci-10.0.0.20260917 · GHCi.Message