flan-repl.el is a comint buffer whose every line goes through the same eval-expr request C-x C-e uses - no new protocol, no compiler support. Deriving from comint rather than hand-rolling a prompt is the same call as deriving flan-mode from lisp-mode: history, the input ring and kill/yank already exist and are not worth rewriting. There is no subprocess behind it; the "process" is a stub comint needs in order to have a prompt. It is program-scoped: a name typed at the prompt resolves against the running program's top-level namespace, so in sand you write sim/settle. A buffer visiting a package's file gets the alias applied for it because the file says which package it belongs to, and a prompt has no file to derive one from. RET on a half-typed form opens a line instead of sending it, with balance checked through the Flan syntax table so a paren inside a string does not count. A value and the program's output are different things and arrive by different routes: the value is the result of the request and appears at the prompt, while anything printed rides along on the same reply into *flan-output*. Showing them in one place would be convenient and wrong, so there is a test for the separation - and it caught a real bug. The renderer's Unit case emitted () with no evaluation at all, so (print-line "x"), the most ordinary thing anyone types at a prompt, answered while nothing happened. A Unit expression is almost always a call made for its effect; it is evaluated and then reported.
Description
Languages
OCaml
67.2%
Emacs Lisp
15.2%
C
10.4%
HTML
2.9%
Standard ML
2.8%
Other
1.5%