mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
List takes interned element
This commit is contained in:
parent
f2a42affd1
commit
e4b5252e51
16 changed files with 173 additions and 83 deletions
|
@ -427,7 +427,8 @@ impl<'a, 'r> Ctx<'a, 'r> {
|
|||
}
|
||||
}
|
||||
}
|
||||
Some(Layout::Builtin(Builtin::List(self.alloc(*elem_layout))))
|
||||
let elem_layout = self.interner.insert(self.alloc(*elem_layout));
|
||||
Some(Layout::Builtin(Builtin::List(elem_layout)))
|
||||
}
|
||||
Expr::EmptyArray => {
|
||||
// TODO don't know what the element layout is
|
||||
|
@ -694,9 +695,10 @@ fn resolve_recursive_layout<'a>(
|
|||
let inner = arena.alloc(resolve_recursive_layout(
|
||||
arena,
|
||||
interner,
|
||||
*inner,
|
||||
*interner.get(inner),
|
||||
when_recursive,
|
||||
));
|
||||
let inner = interner.insert(arena.alloc(inner));
|
||||
Layout::Builtin(Builtin::List(inner))
|
||||
}
|
||||
Builtin::Int(_)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue