mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Defer specialization by one level only
This commit is contained in:
parent
ff7429cab4
commit
c6a0970b73
3 changed files with 94 additions and 77 deletions
|
@ -227,8 +227,14 @@ pub fn build(
|
|||
|
||||
// Populate Procs further and get the low-level Expr from the canonical Expr
|
||||
let main_body = Expr::new(&mut mono_env, loc_expr.value, &mut procs);
|
||||
let mut headers = {
|
||||
let num_headers = match &procs.pending_specializations {
|
||||
Some(map) => map.len(),
|
||||
None => 0,
|
||||
};
|
||||
|
||||
let mut headers = Vec::with_capacity(procs.pending_specializations.len());
|
||||
Vec::with_capacity(num_headers)
|
||||
};
|
||||
let mut layout_cache = LayoutCache::default();
|
||||
let mut procs = roc_mono::expr::specialize_all(&mut mono_env, procs, &mut layout_cache);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue