mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Parameterize program solving on a FunctionKind
This new flag determines whether we should introduce a new kind to represent lambda sets, or whether lambdas should be erased. The latter is not yet implemented.
This commit is contained in:
parent
60c98ea5d5
commit
44c4797d9a
29 changed files with 126 additions and 13 deletions
|
@ -32,6 +32,7 @@ roc_load = { path = "../compiler/load" }
|
|||
roc_parse = { path = "../compiler/parse" }
|
||||
roc_repl_eval = { path = "../repl_eval" }
|
||||
roc_reporting = { path = "../reporting" }
|
||||
roc_solve = { path = "../compiler/solve" }
|
||||
roc_target = { path = "../compiler/roc_target" }
|
||||
roc_types = { path = "../compiler/types" }
|
||||
|
||||
|
|
|
@ -180,6 +180,7 @@ 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(
|
||||
|
@ -187,6 +188,7 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue