pub struct InductiveEnv { /* private fields */ }Expand description
Environment extension for inductive types.
Implementations§
Source§impl InductiveEnv
impl InductiveEnv
Sourcepub fn add(&mut self, ind: InductiveType) -> Result<(), KernelError>
pub fn add(&mut self, ind: InductiveType) -> Result<(), KernelError>
Add an inductive type to the environment.
Sourcepub fn get(&self, name: &Name) -> Option<&InductiveType>
pub fn get(&self, name: &Name) -> Option<&InductiveType>
Get an inductive type by name.
Sourcepub fn is_constructor(&self, name: &Name) -> bool
pub fn is_constructor(&self, name: &Name) -> bool
Check if a name is a constructor.
Sourcepub fn get_constructor_parent(&self, name: &Name) -> Option<&Name>
pub fn get_constructor_parent(&self, name: &Name) -> Option<&Name>
Get the parent type of a constructor.
Sourcepub fn is_recursor(&self, name: &Name) -> bool
pub fn is_recursor(&self, name: &Name) -> bool
Check if a name is a recursor.
Sourcepub fn get_recursor_parent(&self, name: &Name) -> Option<&Name>
pub fn get_recursor_parent(&self, name: &Name) -> Option<&Name>
Get the parent type of a recursor.
Sourcepub fn register_in_env(
&mut self,
ind: &InductiveType,
env: &mut Environment,
) -> Result<(), KernelError>
pub fn register_in_env( &mut self, ind: &InductiveType, env: &mut Environment, ) -> Result<(), KernelError>
Register an InductiveType into an Environment via ConstantInfo.
This is the checked path: the declaration goes through
crate::inductive::derive::add_inductive_family, which typechecks
the type and constructor telescopes, enforces the universe rule and
WHNF-hardened strict positivity, and derives the recursor itself.
Trait Implementations§
Auto Trait Implementations§
impl !Send for InductiveEnv
impl !Sync for InductiveEnv
impl Forget for InductiveEnv
impl Freeze for InductiveEnv
impl Move for InductiveEnv
impl RefUnwindSafe for InductiveEnv
impl Unpin for InductiveEnv
impl UnsafeUnpin for InductiveEnv
impl UnwindSafe for InductiveEnv
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more