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
|
tyid
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_typeid(&self, tn: &String) -> Option<TypeID> {
|
pub fn get_typename(&self, tid: &u64) -> Option<String> {
|
||||||
if let Some(id) = self.typenames.mλ.get(tn) {
|
self.typenames.my.get(tid).cloned()
|
||||||
Some(*id)
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_typeid(&self, tn: &String) -> Option<TypeID> {
|
||||||
|
self.typenames.mλ.get(tn).cloned()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn type_term_from_str(&self, typename: &str) -> Option<TypeTerm> {
|
pub fn type_term_from_str(&self, typename: &str) -> Option<TypeTerm> {
|
||||||
|
|
Loading…
Reference in a new issue