type dict: add get_typename
This commit is contained in:
parent
6867297eea
commit
4afdb61b87
1 changed files with 5 additions and 5 deletions
|
@ -144,12 +144,12 @@ impl TypeDict {
|
|||
tyid
|
||||
}
|
||||
|
||||
pub fn get_typename(&self, tid: &u64) -> Option<String> {
|
||||
self.typenames.my.get(tid).cloned()
|
||||
}
|
||||
|
||||
pub fn get_typeid(&self, tn: &String) -> Option<TypeID> {
|
||||
if let Some(id) = self.typenames.mλ.get(tn) {
|
||||
Some(*id)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
self.typenames.mλ.get(tn).cloned()
|
||||
}
|
||||
|
||||
pub fn type_term_from_str(&self, typename: &str) -> Option<TypeTerm> {
|
||||
|
|
Loading…
Reference in a new issue