diff --git a/schala-repl/src/language.rs b/schala-repl/src/language.rs index ce2bedd..34af586 100644 --- a/schala-repl/src/language.rs +++ b/schala-repl/src/language.rs @@ -170,6 +170,48 @@ pub trait ProgrammingLanguageInterface { fn get_doc(&self, _commands: &Vec<&str>) -> Option { None } + + /* ------- */ + // new trait methods + // + // + + fn run_computation(&mut self, _request: ComputationRequest) -> ComputationResponse { + ComputationResponse { + main_output: Err(format!("Computation pipeline not implemented")), + global_output_stats: GlobalOutputStats::default(), + debug_responses: vec![], + } + } + + fn repl_request(&self, repl_request: String) -> String { + format!("Repl request not implemented") + } } +struct ComputationRequest { + pub source: String, + pub debug_requests: Vec, +} +struct ComputationResponse { + pub main_output: Result, + pub global_output_stats: GlobalOutputStats, + pub debug_responses: Vec, +} + +struct DebugRequest { + kind: String, + value: String +} + +struct DebugResponse { + kind: String, + value: String +} + +#[derive(Default, Debug)] +struct GlobalOutputStats { + total_duration: Option, + stage_durations: Option> +} diff --git a/schala-repl/src/repl/mod.rs b/schala-repl/src/repl/mod.rs index 0647765..6f0aef0 100644 --- a/schala-repl/src/repl/mod.rs +++ b/schala-repl/src/repl/mod.rs @@ -103,6 +103,17 @@ impl NewRepl { } } + + + +/* --------------------------------------------- */ + + + + + + + pub struct Repl { options: EvalOptions, languages: Vec>,