mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
represent byte/bool closure as unit
This commit is contained in:
parent
3ea63ee18f
commit
2c1ab68ea7
2 changed files with 28 additions and 6 deletions
|
@ -415,13 +415,10 @@ impl<'a> LambdaSet<'a> {
|
|||
use UnionVariant::*;
|
||||
match variant {
|
||||
Never => Layout::Union(UnionLayout::NonRecursive(&[])),
|
||||
Unit | UnitWithArguments => Layout::Struct(&[]),
|
||||
BoolUnion { .. } => {
|
||||
// Layout::Builtin(Builtin::Int1),
|
||||
|
||||
Unit | UnitWithArguments | BoolUnion { .. } | ByteUnion(_) => {
|
||||
// no useful information to store
|
||||
Layout::Struct(&[])
|
||||
}
|
||||
ByteUnion(_) => Layout::Builtin(Builtin::Int8),
|
||||
Newtype {
|
||||
arguments: layouts, ..
|
||||
} => Layout::Struct(layouts.into_bump_slice()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue