mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
code gen for variably-sized closures
This commit is contained in:
parent
1953f563f7
commit
c8c1a0678a
6 changed files with 322 additions and 311 deletions
|
@ -717,6 +717,7 @@ pub fn constrain_expr(
|
|||
arguments,
|
||||
loc_body: boxed,
|
||||
captured_symbols,
|
||||
name,
|
||||
..
|
||||
} => {
|
||||
use roc_can::expr::Recursive;
|
||||
|
@ -799,8 +800,7 @@ pub fn constrain_expr(
|
|||
));
|
||||
}
|
||||
|
||||
let tag_name_string = format!("Closure_{}", closure_var.index());
|
||||
let tag_name = roc_module::ident::TagName::Global(tag_name_string.into());
|
||||
let tag_name = roc_module::ident::TagName::Closure(*name);
|
||||
let closure_type = Type::TagUnion(
|
||||
vec![(tag_name, tag_arguments)],
|
||||
Box::new(Type::Variable(closure_ext_var)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue