mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Put list_element_layout!
macro into mono
This commit is contained in:
parent
2f620f048e
commit
f80edb6ed6
2 changed files with 11 additions and 9 deletions
|
@ -2113,6 +2113,16 @@ pub enum Builtin<'a> {
|
|||
List(InLayout<'a>),
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! list_element_layout {
|
||||
($interner:expr, $list_layout:expr) => {
|
||||
match $interner.get($list_layout) {
|
||||
Layout::Builtin(Builtin::List(list_layout)) => list_layout,
|
||||
_ => internal_error!("invalid list layout"),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
pub struct Env<'a, 'b> {
|
||||
target_info: TargetInfo,
|
||||
arena: &'a Bump,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue