Merge branch 'trunk' into assoc-list-dict

This commit is contained in:
Folkert de Vries 2022-07-14 16:47:50 +02:00 committed by GitHub
commit 1b1b63aad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 2681 additions and 780 deletions

View file

@ -359,9 +359,6 @@ impl IAbilitiesStore<Resolved> {
}
pub fn insert_resolved(&mut self, id: SpecializationId, specialization: Symbol) {
// May not be a thing in mono
// debug_assert!(self.is_specialization_name(specialization));
let old_specialization = self.resolved_specializations.insert(id, specialization);
debug_assert!(
@ -371,15 +368,6 @@ impl IAbilitiesStore<Resolved> {
);
}
pub fn remove_resolved(&mut self, id: SpecializationId) {
let old_specialization = self.resolved_specializations.remove(&id);
debug_assert!(
old_specialization.is_some(),
"Trying to remove a resolved specialization that was never there!",
);
}
pub fn get_resolved(&self, id: SpecializationId) -> Option<Symbol> {
self.resolved_specializations.get(&id).copied()
}

File diff suppressed because it is too large Load diff

View file

@ -471,6 +471,15 @@ pub enum Recursive {
TailRecursive = 2,
}
impl Recursive {
pub fn is_recursive(&self) -> bool {
match self {
Recursive::NotRecursive => false,
Recursive::Recursive | Recursive::TailRecursive => true,
}
}
}
#[derive(Clone, Debug)]
pub struct WhenBranch {
pub patterns: Vec<Loc<Pattern>>,

View file

@ -5,6 +5,7 @@ pub mod abilities;
pub mod annotation;
pub mod builtins;
pub mod constraint;
pub mod copy;
pub mod def;
pub mod effect_module;
pub mod env;