mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Extract marking s builtin into header type method
This commit is contained in:
parent
8c62640b97
commit
87a279dc2c
2 changed files with 15 additions and 15 deletions
|
@ -103,6 +103,19 @@ impl<'a> HeaderType<'a> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_maybe_builtin(self, module_id: ModuleId) -> Self {
|
||||
match self {
|
||||
HeaderType::Interface { name, exposes } if module_id.is_builtin() => {
|
||||
HeaderType::Builtin {
|
||||
name,
|
||||
exposes,
|
||||
generates_with: &[],
|
||||
}
|
||||
}
|
||||
_ => self,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue