oboard/moonbit-eval/interpreter/core does not have a README file
pub suberror ControlFlow {
Raise(RuntimeValue)
Continue(Array[RuntimeValue])
Break(RuntimeValue)
Return(RuntimeValue)
Error(String)
}pub(all) struct ClosureInterpreter {
extern_fns : Map[String, (RuntimeFunctionContext) -> RuntimeValue raise ControlFlow]
embedded_fns : Map[String, (RuntimeFunctionContext) -> RuntimeValue raise ControlFlow]
embedded_methods : Map[String, Map[String, (RuntimeFunctionContext) -> RuntimeValue raise ControlFlow]]
main_pkg : RuntimePackage
current_pkg : RuntimePackage
call_stack : Array[RuntimeLocation]
}fn ClosureInterpreter::add_embedded_fn(self : ClosureInterpreter, name : String, f : (RuntimeFunctionContext) -> RuntimeValue raise ControlFlow) -> Unitfn ClosureInterpreter::add_embedded_method(self : ClosureInterpreter, type_name : String, method_name : String, f : (RuntimeFunctionContext) -> RuntimeValue raise ControlFlow) -> Unitfn ClosureInterpreter::add_extern_fn(self : ClosureInterpreter, name : String, f : (RuntimeFunctionContext) -> RuntimeValue raise ControlFlow) -> Unitfn ClosureInterpreter::bind_function_parameters(self : ClosureInterpreter, params : List[Parameter], args : List[RuntimeArgument]) -> Unit raise ControlFlowfn ClosureInterpreter::call(self : ClosureInterpreter, function : (RuntimeFunctionContext) -> RuntimeValue raise ControlFlow, pkg : RuntimePackage, args : FixedArray[RuntimeArgument]) -> RuntimeValue raise ControlFlowfn ClosureInterpreter::call_closure(self : ClosureInterpreter, function : Func, pkg : RuntimePackage, args : List[Argument], name? : String) -> RuntimeValue raise ControlFlowfn ClosureInterpreter::constants_equal(_self : ClosureInterpreter, c1 : Constant, c2 : Constant) -> Boolfn ClosureInterpreter::constants_equal_expr(self : ClosureInterpreter, expr1 : Expr, expr2 : Expr) -> Boolfn ClosureInterpreter::create_function(self : ClosureInterpreter, func : Func, pkg : RuntimePackage, name? : String) -> WithType[(RuntimeFunctionContext) -> RuntimeValue raise ControlFlow]fn ClosureInterpreter::define_struct_method(self : ClosureInterpreter, pkg : RuntimePackage, type_name : String, method_name : String, func : Func) -> Unitfn ClosureInterpreter::interp_string(self : ClosureInterpreter, elems : List[InterpElem]) -> String raise ControlFlowfn ClosureInterpreter::load_package(self : ClosureInterpreter, pkg : RuntimePackage, target? : String) -> Unitfn ClosureInterpreter::match_case(self : ClosureInterpreter, value : RuntimeValue, pattern : Pattern) -> Boolfn ClosureInterpreter::parse_error_type(self : ClosureInterpreter, ty : ErrorType) -> RuntimeErrorTypefn ClosureInterpreter::pattern_match(self : ClosureInterpreter, value : RuntimeValue, cases : List[Case]) -> RuntimeValue raise ControlFlowfn ClosureInterpreter::pattern_to_runtime_value(self : ClosureInterpreter, pattern : Pattern) -> RuntimeValue?fn ClosureInterpreter::runtime_value_in_range(self : ClosureInterpreter, value : RuntimeValue, lhs : Pattern, rhs : Pattern, kind : RangeKind) -> Boolfn ClosureInterpreter::top_func_def_to_closure(self : ClosureInterpreter, pkg : RuntimePackage, func : Impl, name? : String) -> (String?, RuntimeValue)fn ClosureInterpreter::visit(self : ClosureInterpreter, node : Expr, expected_type? : String) -> RuntimeValue raise ControlFlowfn ClosureInterpreter::visit_interp(self : ClosureInterpreter, elems : List[InterpElem]) -> RuntimeValue raise ControlFlowfn ClosureInterpreter::visit_multiline_string(self : ClosureInterpreter, elems : List[MultilineStringElem]) -> RuntimeValue raise ControlFlowfn ClosureInterpreter::visit_scoped(self : ClosureInterpreter, node : Expr, loc : RuntimeLocation) -> RuntimeValue raise ControlFlowfn[T] ClosureInterpreter::with_ident(self : ClosureInterpreter, long_ident : LongIdent, func : (RuntimePackage, String) -> T raise?) -> T raise?fn ModuleInfo::new(name : String, version? : String, readme? : String, repository? : String, license? : String, keywords? : Array[String], description? : String, source? : String, deps? : Map[String, String]) -> ModuleInfopub(all) enum RuntimeArgumentKind {
Positional
Labelled(String)
LabelledOption(String)
}pub(all) struct RuntimeEnvironment {
values : Map[String, RuntimeValue]
mutable_vars : Map[String, Bool]
parent : RuntimeEnvironment?
} derive(ToJson)fn RuntimeEnvironment::new(parent? : RuntimeEnvironment, values? : Map[String, RuntimeValue]) -> RuntimeEnvironmentfn RuntimeEnvironment::set_mutable_variable(self : RuntimeEnvironment, name : String, value : RuntimeValue) -> Unitfn RuntimeEnvironment::update(self : RuntimeEnvironment, name : String, new_value : RuntimeValue) -> Unitpub(all) enum RuntimeErrorType {
ErrorType(RuntimeType)
DefaultErrorType
NoErrorType
Noraise
MaybeError(RuntimeType)
} derive(ToJson)pub(all) struct RuntimeFunctionContext {
context : ClosureInterpreter
pkg : RuntimePackage
args : FixedArray[RuntimeArgument]
}pub(all) struct RuntimeModule {
meta : ModuleInfo
pkgs : Map[String, RuntimePackage]
} derive(ToJson)pub(all) struct RuntimePackage {
name : String
traits : Map[String, TraitDecl]
fn_aliases : Map[String, RuntimeValue]
type_aliases : Map[String, WithType[TypeDecl]]
trait_aliases : Map[String, WithType[TraitDecl]]
stubs : Map[String, String]
type_definitions : Map[String, TypeDecl]
type_derived_traits : Map[String, Array[String]]
struct_constrs : Map[String, String]
constructors : Map[String, String]
struct_methods : Map[String, Map[String, RuntimeValue]]
trait_methods : Map[String, Map[String, RuntimeValue]]
values : Map[String, RuntimeValue]
env : RuntimeEnvironment
deps : Map[String, RuntimePackage]
files : Map[String, String]
loaded : Bool
} derive(ToJson)fn RuntimePackage::check_type_constraint(_self : RuntimePackage, value : RuntimeValue, constraint : Type) -> Boolfn RuntimePackage::cons(self : RuntimePackage, name : String, args : Array[RuntimeValue]) -> RuntimeValuefn RuntimePackage::cons_with_labels(self : RuntimePackage, name : String, labeled_args : Array[(String?, RuntimeValue, Bool)]) -> RuntimeValuefn RuntimePackage::define_trait_method(self : RuntimePackage, trait_id : String, method_name : String, func : RuntimeValue) -> Unitfn RuntimePackage::new(pkg : String, deps? : Map[String, RuntimePackage], files? : Map[String, String]) -> RuntimePackagepub(all) enum RuntimeType {
Any
Arrow(List[RuntimeType], RuntimeType, RuntimeErrorType, Bool)
Tuple(List[RuntimeType])
Name(RuntimePackage, String, List[RuntimeType])
Option(RuntimeType)
Object(RuntimePackage, String)
Internal
} derive(ToJson)pub(all) enum RuntimeValue {
Unit
Bool(Bool)
Int(Int, String?)
UInt(UInt)
UInt16(UInt16)
Int64(Int64)
UInt64(UInt64)
Float(Float)
Double(Double)
BigInt(BigInt)
Char(Char)
Byte(Byte)
String(String)
Bytes(Bytes)
StringView(StringView)
StringBuilder(StringBuilder)
HashMap(HashMap[RuntimeValue, RuntimeValue])
Tuple(Array[RuntimeValue])
Array(Array[RuntimeValue])
FixedArray(FixedArray[RuntimeValue])
ArrayView(ArrayView[RuntimeValue])
UninitializedArray(UninitializedArray[RuntimeValue])
Map(Map[RuntimeValue, RuntimeValue])
Object(WithType[Map[String, RuntimeValue]])
Fn(WithType[(RuntimeFunctionContext) -> RuntimeValue raise ControlFlow])
Constructor(WithType[ConstructorValue])
Exception(String)
Iter(Iter[RuntimeValue])
Iter2(Iter2[RuntimeValue, RuntimeValue])
Json(Json)
}impl Add for RuntimeValueimpl Compare for RuntimeValueimpl Eq for RuntimeValueimpl Hash for RuntimeValueimpl Show for RuntimeValueimpl ToJson for RuntimeValuefn RuntimeValue::overload_array_literal(self : RuntimeValue, expected_type : String) -> RuntimeValuetype TraitDecltype TypeDeclMoonBit Eval Package
Dependencies