ghul.repl
0.31.1
Prefix Reserved
See the version list below for details.
dotnet add package ghul.repl --version 0.31.1
NuGet\Install-Package ghul.repl -Version 0.31.1
<PackageReference Include="ghul.repl" Version="0.31.1" />
<PackageVersion Include="ghul.repl" Version="0.31.1" />
<PackageReference Include="ghul.repl" />
paket add ghul.repl --version 0.31.1
#r "nuget: ghul.repl, 0.31.1"
#:package ghul.repl@0.31.1
#addin nuget:?package=ghul.repl&version=0.31.1
#tool nuget:?package=ghul.repl&version=0.31.1
ghul.repl
The session behind a ghūl read-eval-print loop.
A session is a list of accepted cells. Each submission is compiled as its
own library assembly in its own namespace, referencing the earlier cells'
assemblies, and the session generates the use prelude that makes the
earlier cells' names visible - one per visible name, naming the cell that
last defined it, so a redefinition takes effect going forward and nothing
about name lookup changes. The use directives a cell opens with are
carried into every later cell's prelude too, and every prelude begins with
use default unless the session is made with SESSION(false). Each
prelude leaves out the imports its own cell writes, so its length varies
from cell to cell; request.prelude_line_count is the one to use.
A host hands back the compiler's diagnostics in CELL_REPLY, either as
CELL_DIAGNOSTICs or as the compiler's own lines, which it takes apart.
accept returns them as the user should see them: every location in a
cell, related ones included, names the cell by its label (cell-3) and
counts lines from the first the user wrote. CELL_ERROR.describe does the
same for an exception a cell threw.
This package compiles nothing, loads nothing, runs nothing and names no file. A host drives it in three steps:
let request = session.prepare(source)
// compile request.source, with request.references naming the earlier
// cells whose assemblies it needs; where the result touches disk it is
// named `<request.name>.dll`
let loaded = Ghul.Repl.CELL_EXPORTS.read(assembly)
let outcome = session.accept(request, Ghul.Repl.CELL_REPLY(diagnostics, loaded))
if outcome.is_accepted then
let run = Ghul.Repl.CELL_ENTRY.run(loaded)
fi
CELL_EXPORTS.read takes an assembly the host has already loaded, so a
host that holds its cells as bytes in one load context never has to write
them out. A cell that compiled is accepted whatever its own code then
does, so it is run after it has joined the session.
CELL_DISPLAY.format renders the value a cell ended on - a collection to
a limit of its elements, one level deep, and nothing where the cell ended
on a statement - and prints nothing, so every host shows the same value
the same way.
The compiler needs to be recent enough for --submission, --reference
and use default.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- ghul.runtime (>= 21.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ghul.repl:
| Package | Downloads |
|---|---|
|
ghul.repl.host
Hosts a ghūl REPL session on this machine: compiles each cell with an installed ghul.compiler, kept running as a compile server with a fallback to starting it per cell, loads the result into a load context of the session's own, and runs it. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.37.3 | 39 | 9/22/2026 |
| 0.37.2 | 39 | 9/22/2026 |
| 0.37.1 | 50 | 9/21/2026 |
| 0.37.0 | 56 | 9/19/2026 |
| 0.36.1 | 51 | 9/19/2026 |
| 0.36.0 | 51 | 9/19/2026 |
| 0.35.0 | 267 | 9/19/2026 |
| 0.34.0 | 92 | 9/19/2026 |
| 0.33.1 | 57 | 9/19/2026 |
| 0.33.0 | 47 | 9/19/2026 |
| 0.32.0 | 53 | 9/19/2026 |
| 0.31.2 | 52 | 9/19/2026 |
| 0.31.1 | 59 | 9/19/2026 |
| 0.31.0 | 55 | 9/19/2026 |
| 0.30.0 | 53 | 9/19/2026 |
| 0.29.0 | 55 | 9/19/2026 |
| 0.28.0 | 227 | 9/19/2026 |
| 0.27.2 | 52 | 9/19/2026 |
| 0.27.1 | 50 | 9/19/2026 |
| 0.27.0 | 58 | 9/19/2026 |