mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Add Layout::Erased
This commit is contained in:
parent
283b9d53d6
commit
7ea85e44d2
18 changed files with 58 additions and 14 deletions
|
@ -356,6 +356,7 @@ pub trait LayoutInterner<'a>: Sized {
|
|||
.append(self.to_doc(inner, alloc, seen_rec, parens))
|
||||
.append(")"),
|
||||
FunctionPointer(fp) => fp.to_doc(alloc, self, seen_rec, parens),
|
||||
Erased(e) => e.to_doc(alloc),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1131,6 +1132,7 @@ mod reify {
|
|||
ret: reify_layout(arena, interner, slot, ret),
|
||||
})
|
||||
}
|
||||
LayoutRepr::Erased(e) => LayoutRepr::Erased(e),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1404,7 +1406,7 @@ mod equiv {
|
|||
pub mod dbg_deep {
|
||||
use roc_module::symbol::Symbol;
|
||||
|
||||
use crate::layout::{Builtin, LambdaSet, LayoutRepr, UnionLayout};
|
||||
use crate::layout::{Builtin, Erased, LambdaSet, LayoutRepr, UnionLayout};
|
||||
|
||||
use super::{InLayout, LayoutInterner};
|
||||
|
||||
|
@ -1462,6 +1464,7 @@ pub mod dbg_deep {
|
|||
.field("args", &fp.args)
|
||||
.field("ret", &fp.ret)
|
||||
.finish(),
|
||||
LayoutRepr::Erased(Erased) => f.debug_struct("?Erased").finish(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1574,7 +1577,7 @@ pub mod dbg_deep {
|
|||
pub mod dbg_stable {
|
||||
use roc_module::symbol::Symbol;
|
||||
|
||||
use crate::layout::{Builtin, LambdaSet, LayoutRepr, SemanticRepr, UnionLayout};
|
||||
use crate::layout::{Builtin, Erased, LambdaSet, LayoutRepr, SemanticRepr, UnionLayout};
|
||||
|
||||
use super::{InLayout, LayoutInterner};
|
||||
|
||||
|
@ -1640,6 +1643,7 @@ pub mod dbg_stable {
|
|||
.field("args", &fp.args)
|
||||
.field("ret", &fp.ret)
|
||||
.finish(),
|
||||
LayoutRepr::Erased(Erased) => f.debug_struct("?Erased").finish(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue