Returns the constructors if this is an inductive, or an empty vec otherwise.
(&self)
| 148 | |
| 149 | /// Returns the constructors if this is an inductive, or an empty vec otherwise. |
| 150 | pub fn ctors(&self) -> Vec<ConstructorVal> { |
| 151 | match self { |
| 152 | Self::Indc(ind) => ind.ctors.clone(), |
| 153 | _ => vec![], |
| 154 | } |
| 155 | } |
| 156 | /// Returns `true` if this mutual constant contains the given name |
| 157 | /// (including constructor names for inductives). |
| 158 | pub fn contains(&self, name: &Name) -> bool { |