mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
thread reset-reuse through
This commit is contained in:
parent
5bb3146aa8
commit
ee67ee546a
5 changed files with 85 additions and 55 deletions
|
@ -234,7 +234,8 @@ impl<'a> Proc<'a> {
|
|||
procs: &mut MutMap<(Symbol, ProcLayout<'a>), Proc<'a>>,
|
||||
) {
|
||||
for (key, proc) in procs.iter_mut() {
|
||||
let new_proc = crate::reset_reuse::insert_reset_reuse(arena, home, ident_ids, proc.clone());
|
||||
let new_proc =
|
||||
crate::reset_reuse::insert_reset_reuse(arena, home, ident_ids, proc.clone());
|
||||
*proc = new_proc;
|
||||
}
|
||||
}
|
||||
|
@ -1287,11 +1288,12 @@ impl<'a> Expr<'a> {
|
|||
alloc
|
||||
.text("Reuse ")
|
||||
.append(symbol_to_doc(alloc, *symbol))
|
||||
.append(alloc.space())
|
||||
.append(doc_tag)
|
||||
.append(alloc.space())
|
||||
.append(alloc.intersperse(it, " "))
|
||||
}
|
||||
Reset(symbol) => alloc.text("Reuse ").append(symbol_to_doc(alloc, *symbol)),
|
||||
Reset(symbol) => alloc.text("Reset ").append(symbol_to_doc(alloc, *symbol)),
|
||||
|
||||
Struct(args) => {
|
||||
let it = args.iter().map(|s| symbol_to_doc(alloc, *s));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue