mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Add layout to CallByName
This commit is contained in:
parent
510ab36f51
commit
c49abfe2de
6 changed files with 156 additions and 111 deletions
|
@ -1203,14 +1203,16 @@ fn boolean_all<'a>(arena: &'a Bump, tests: Vec<(Expr<'a>, Expr<'a>, Layout<'a>)>
|
|||
let mut expr = Expr::Bool(true);
|
||||
|
||||
for (lhs, rhs, layout) in tests.into_iter().rev() {
|
||||
let test = specialize_equality(arena, lhs, rhs, layout);
|
||||
expr = Expr::CallByName(
|
||||
Symbol::BOOL_AND,
|
||||
arena.alloc([
|
||||
let test = specialize_equality(arena, lhs, rhs, layout.clone());
|
||||
|
||||
expr = Expr::CallByName {
|
||||
name: Symbol::BOOL_AND,
|
||||
layout,
|
||||
args: arena.alloc([
|
||||
(test, Layout::Builtin(Builtin::Bool)),
|
||||
(expr, Layout::Builtin(Builtin::Bool)),
|
||||
]),
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
expr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue