HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

Modulevortex-elab-0.2.2GHC2024

Vortex.Elab

Two flavours: elabAs/elabShow boot a fresh GHC session per call (simple, ~seconds each); newWarmSession keeps one session alive and serves calls over a channel (~milliseconds each after the first). Both enter the wisp's world through enterScope, so a block means the same in either.

  • 3 types
  • 6 values
valueelabAs :: Scope -> String -> String -> IO (Either ElabErr a)
#

Elaborate source as a term of the named type. The caller chooses a; soundness of the coercion is the caller's obligation to pair the type name with the type it actually runs. The kernel is the only intended caller. Every error names the line and column it has in the source, as <hint>:LINE:COL: error: ....

Elaborate and show a pure expression: the empty theory, where evaluation is just forcing. Bounded here because forcing happens inside the interpreter session.

The DSL's callable surface: for each function exported by a scope module imported unaliased, other than Prelude, its name paired with its raw type. This is the capability discovery primitive — reflected from the export list, so it is exactly what a wisp may name bare. A module under an alias (Data.List as List) is a library named through it, not part of the verb table, so it is not listed. The caller normalises the type and attaches docs.

Warm session

2 declarations
datadata WarmHandle
#

A live GHC session that serves elaboration requests without re-booting. Both fields serialise onto the one session thread, so concurrent callers queue rather than clash (GHC's session state is process-global and single-threaded — hence one session, not many).

Constructors

Boot one persistent GHC session and return handles onto it. The session thread lives for the process; its DynFlags, package db, and imports are paid once, so each subsequent request is just compile-the-expression.