mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Merge branch 'trunk' into store-bool-closure-as-unit
This commit is contained in:
commit
bb7726b0e0
10 changed files with 315 additions and 342 deletions
|
@ -1519,7 +1519,10 @@ impl UnionTags {
|
|||
)
|
||||
}
|
||||
|
||||
fn from_slices(tag_names: SubsSlice<TagName>, variables: SubsSlice<VariableSubsSlice>) -> Self {
|
||||
pub fn from_slices(
|
||||
tag_names: SubsSlice<TagName>,
|
||||
variables: SubsSlice<VariableSubsSlice>,
|
||||
) -> Self {
|
||||
debug_assert_eq!(tag_names.len(), variables.len());
|
||||
|
||||
Self {
|
||||
|
@ -1578,6 +1581,16 @@ impl UnionTags {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn tag_without_arguments(subs: &mut Subs, tag_name: TagName) -> Self {
|
||||
subs.tag_names.push(tag_name);
|
||||
|
||||
Self {
|
||||
length: 1,
|
||||
tag_names_start: (subs.tag_names.len() - 1) as u32,
|
||||
variables_start: 0,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn insert_slices_into_subs<I>(subs: &mut Subs, input: I) -> Self
|
||||
where
|
||||
I: IntoIterator<Item = (TagName, VariableSubsSlice)>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue