preparations for specializing closures

This commit is contained in:
Folkert 2020-10-20 00:33:10 +02:00
parent 48d13a7b12
commit 3408a31453
7 changed files with 113 additions and 21 deletions

View file

@ -1277,8 +1277,7 @@ fn constrain_closure_size(
));
}
let tag_name_string = format!("Closure_{:?}_{}", name, 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)),