Create a new crate roc_repl_ui for shared CLI/web UI code

This commit is contained in:
Brian Carroll 2023-09-09 11:55:55 +01:00
parent dbf928bc46
commit 8f59ee9492
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
13 changed files with 701 additions and 8 deletions

View file

@ -180,7 +180,6 @@ pub async fn entrypoint_from_js(src: String) -> Result<String, String> {
// Compile the app
let target_info = TargetInfo::default_wasm32();
let function_kind = roc_solve::FunctionKind::LambdaSet;
// TODO use this to filter out problems and warnings in wrapped defs.
// See the variable by the same name in the CLI REPL for how to do this!
let mono = match compile_to_mono(
@ -188,7 +187,6 @@ pub async fn entrypoint_from_js(src: String) -> Result<String, String> {
std::iter::empty(),
&src,
target_info,
function_kind,
DEFAULT_PALETTE_HTML,
) {
(Some(m), problems) if problems.is_empty() => m, // TODO render problems and continue if possible