ghul.repl 0.29.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package ghul.repl --version 0.29.0
                    
NuGet\Install-Package ghul.repl -Version 0.29.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ghul.repl" Version="0.29.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ghul.repl" Version="0.29.0" />
                    
Directory.Packages.props
<PackageReference Include="ghul.repl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ghul.repl --version 0.29.0
                    
#r "nuget: ghul.repl, 0.29.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ghul.repl@0.29.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ghul.repl&version=0.29.0
                    
Install as a Cake Addin
#tool nuget:?package=ghul.repl&version=0.29.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 0 9/22/2026
0.37.2 0 9/22/2026
0.37.1 48 9/21/2026
0.37.0 53 9/19/2026
0.36.1 49 9/19/2026
0.36.0 49 9/19/2026
0.35.0 249 9/19/2026
0.34.0 90 9/19/2026
0.33.1 55 9/19/2026
0.33.0 45 9/19/2026
0.32.0 51 9/19/2026
0.31.2 50 9/19/2026
0.31.1 57 9/19/2026
0.31.0 53 9/19/2026
0.30.0 51 9/19/2026
0.29.0 52 9/19/2026
0.28.0 225 9/19/2026
0.27.2 50 9/19/2026
0.27.1 48 9/19/2026
0.27.0 56 9/19/2026
Loading failed