If the associated typeset has a single type return it. Otherwise return None.
(&self)
| 121 | |
| 122 | /// If the associated typeset has a single type return it. Otherwise return None. |
| 123 | pub fn singleton_type(&self) -> Option<ValueType> { |
| 124 | let type_set = self.get_typeset(); |
| 125 | if type_set.size() == 1 { |
| 126 | Some(type_set.get_singleton()) |
| 127 | } else { |
| 128 | None |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | /// Get the free type variable controlling this one. |
| 133 | pub fn free_typevar(&self) -> Option<TypeVar> { |
no test coverage detected