gleamunison/repl_eval
Values
pub fn bootstrap_defs(
defs: List(#(String, elab_types.SurfaceDef)),
cache: types.TypeCache,
) -> #(types.TypeCache, List(#(String, elab_types.SurfaceDef)))
pub fn deserialize_term(bytes: BitArray) -> a
pub fn do_eval(
term: elab_types.SurfaceTerm,
name: String,
cache: types.TypeCache,
prev_defs: List(#(String, elab_types.SurfaceDef)),
) -> Result(#(String, ast.Type, types.TypeCache), String)
pub fn format_elab_error(
err: elab_types.ElaborateError,
prev_defs: List(#(String, elab_types.SurfaceDef)),
) -> String
Render an elaboration error for humans. Public: the LSP server renders the same messages, but needs the span separately (see span_of_error).
pub fn handle_define(
name: String,
val: elab_types.SurfaceTerm,
cache: types.TypeCache,
prev_defs: List(#(String, elab_types.SurfaceDef)),
) -> Result(
#(types.TypeCache, List(#(String, elab_types.SurfaceDef))),
String,
)
pub fn ref_for_name(name: String) -> identity.DefinitionRef
The name-to-ref derivation belongs to identity; this is the public contract its callers have always used, kept as a delegate rather than left as a second authority for the bytes.
pub fn seed_builtin_term_types(
cache: types.TypeCache,
) -> types.TypeCache
Every builtin signature comes from the bootstrap table. A partial seed here used to leave all but three builtins with the unknown TypeVar(-1).
pub fn serialize_term(term: a) -> BitArray